Note the upgraded forum! If you are experiencing issues logging in, you may need to reset your password which should send an email. If the email doesn't arrive, be sure to check your spam folder just in case.

Is there a submit_value function for Form Builder Class?

edited March 2011 in Modules
I'm sorry if I keep asking about Fuel's CMS, I'm still new and I want to use all of the features to it's full potential.

I want to be able to set the name and value of the submit button when i create forms with the form builder class. However the only option according to the user guide is to change the value, which will default with the same name.

$this->load->library('form_builder', array('submit_value' => 'add'));

This where my idea of getting it to work with:
$this->form->submit('Add new entry', 'add', 'class="submit"');


  • edited 2:33PM
    The submit value can also be a tag <input type="submit" value="Add" name="add" />
  • DatDat
    edited 2:33PM
    Wow was that in the user guide? cause that blows my mind that there some hidden stuff in fuel cms. like a mac.
  • edited 2:33PM
    I doubt it's in there... I actually forgot about that until the other day when looking into another forum post.
  • edited 2:33PM
    Is there any way to get multiple submit buttons into a form?

  • edited 2:33PM
    There is an "other_actions" property that can be set on Form_builder in which you can include additional HTML that will appear next to the main submit button:
    <input type="submit" value="Other Action" />
  • edited 2:33PM
    And is there any way to set a class on the submit that is generated by form_builder (not the one created with additional css) ? I see a way to set a value for the whole form, but not for the submit, cancel, reset.
  • edited 2:33PM
    For the values "reset_value", "cancel_value", and "submit_value", you can put in the entire tag value if you want like so and Form_builder will know to display that instead of embedding it into the "value" attribute of each element:
    <input type="submit" class="my_submit_class" value="Save" />
Sign In or Register to comment.