CMS MADE SIMPLE FORGE

Form Builder

 

[#12323] Option to set class for submit button

avatar
Created By: Tristan (tristan)
Date Submitted: 2020-06-17 08:06

Assigned To:
Resolution: None
State: Open
Summary:
Option to set class for submit button
Detailed Description:
Have an option somewhere when editing a form to specify the class for the submit
button. At the moment you'd have to hack that into Form.class.php but since you
can also set classes for all the other options it would be nice to be able to
edit that via the module directly as well.

History

Comments
avatar
Date: 2020-06-17 08:46
Posted By: Fernando Morgado (JoMorg)

I have been using Bootstrap for all my forms in FB without issues and no hacks
:)
example
< button id="save-btn" type="submit" value="submit" class="btn btn-success
pull-right mg5" >Save< /button >

Just use plain HTML in the form like this
  < div class="form-group form-group-sm pd10" >
< label for="notes" class="control-label" >< small >< strong >Description<
/strong >< /small >< /label >
< textarea name="{$actionid}{$description->input_id}" id="notes" rows="3"
class="form-control required"
              placeholder="Notes" >< /textarea >
  < /div >
{$actionid}{$field_name_here->input_id} is the key.

Having said that: there will be a few new features in the future FB to make it
easier to layout and style forms in FB.
      
avatar
Date: 2020-06-20 17:00
Posted By: Tristan (tristan)

Understood! Would probably make sense to add a Bootstrap template besides the
other templates shipped with FB.
      
Updates

Updated: 2020-06-17 08:46
resolution_id: => 5