A couple of form questions

edited September 2011 in Modules
1) How can I setup a multi-column form using the Form Builder?

2) How can I just display a value (that I don't want the user to change) using the Form Builder? Such as a user name which I want shown but not editable.

Thanks in advance.

Comments

  • edited 5:05PM
    1) If you are using Form Builder outside of the admin, you can use the "render_divs" method which will take it out of the table format and use divs which may make it a little more pliable for multiple columns (inside the admin uses tables).

    2) There are readonly and displayonly properties you can set on Form Builder to tell it what fields to either set as readonly (inputs stilly show, just can't change), or display only which just the value is displayed.

    http://www.getfuelcms.com/user_guide/libraries/form_builder
  • edited 5:05PM
    Great! Thanks. I tried readonly, and must have missed the displayonly attribute.
  • edited 5:05PM
    I am trying to set the readonly attribute for a checkbox and it is not working. could you please help me with this one.

    Here is the syntax I am using

    $fields['collection_priority'] = array('type' => 'checkbox', 'value' => '1', 'readonly' => TRUE);

    I have also tried

    $fields['collection_priority'] = array('type' => 'checkbox', 'value' => '1', 'readonly' => 'readonly');

    Displayonly works but I need readonly to work
Sign In or Register to comment.