Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Form render not in TABLES
  • Hi all, I'm trying tu use a Fieldset without rendering its Form in an HTML Table. The only way I found was to manually use the Fieldset_Field inside the Form and use it as I wanted:
    <?php 
     $email_f    = $login_fieldset->field('email');
    ?>
     <input class="input-large" name="<?php echo $email_f->name ?>" type="<?php echo $email_f->type ?>" placeholder="<?php echo $email_f->label ?>" value="<?php echo $email_f->value ?>">
    

    Is there another way of doing this? Am I going to hit a wall at some point? Thanks!
  • Copy form.php in from core/config/ to app/config/ and amend:
    return array(
        'field_template'        => '&#123;label}&#123;field}<br />',
        'multi_field_template'  => '&#123;label}&#123;field}<br />'
    );
    
    or change the template for a specific fieldset instance:
    $fieldset->set_config('field_template', '&#123;field}');
    
  • Great!
    Thanks, that's exactly what I needed!

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion