Form builder submit
  • Is it possible to either not have a submit button for the form builder, and / or set it as a button tag?
  • Yes to both. Form_builder has a "submit_value" property that you can assign to it. If it is a string value that does not begin with a "<" then it will simply use that text as the value of the Submit button. If it does start with a "<" then it will treat it as HTML and render the string you pass it as such. If you pass it an empty string, then it will not render the submit_value.<br />
    Additionally, there is an "other_actions" property on Form_builder that gets rendered right next to the Submit button which can be any HTML.

    If you are wanting to set the submit_value from a model's form_fields method, you can do the following:

    $fields['__FORM_BUILDER__']['submit_value'] = '<button name="my_button" id="my_button">MY Button</button>';
  • Excellent - many thanks!

Howdy, Stranger!

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