Is there a submit_value function for Form Builder Class?

DatDat
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"');

Comments

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

    Thanks.
  • edited 7:28AM
    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" />
    http://www.getfuelcms.com/user_guide/libraries/form_builder
  • edited 7:28AM
    Thanks.
    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 7:28AM
    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.