Jump to:

5539 Posts in 1738 Topics by 1224 members

Customising the CMS

SilverStripe Forums » Customising the CMS » 1 Form, Multiple Functions for Fields, 1 Submit Button - Possible?

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 341 Views
  • B00mtastikā„¢
    Avatar
    Community Member
    18 Posts

    1 Form, Multiple Functions for Fields, 1 Submit Button - Possible? Link to this post

    Hello Stripers,

    I have a problem with customizing a form. This is NOT using UserDefinedForms, but creating a custom form into SiteTree. I think. (Still learning, always will)

    Currently, I have gotten a form to work as needed with all input fields as I want them. I am also using Bootstrap organize everything on the page, and the problem here becomes that the single form does not allow me to use bootstrap to its full ability, since the entire form becomes one function that I can only call through the ".ss" templates. So I though, why not create each portion of the form into its own function and then call each of them as necessary to allow placing them in the right locations for bootstrapping.

    What I'm now trying to figure out is how to have multiple functions but only one submit button that will write data to database for all input fields. Currently the way I've gotten it to work, each form is on its own column via bootstrap, but then each of those functions/forms have their own submit, giving me a total of 4 submit buttons on the same page. Slightly annoying right?

    Can someone please help/smackmeoverthehead/point me in the right direction as how to proceed from here? This could be something simple as pushing all data towards a single FormDataEntry Function and write and publish to stage/live. I just haven't been able to get it to work/find a work around.

    Any input appreciated and thank you in advanced.

    -b00mer

    UPDATE/EDIT

    I know there is a module out there called bootstrap forms, but I'm still wondering and curious about getting this to work so that I can have fine tuned control over my functions and where the data will be going to. I can see having to use this in the future, considering the company I'm currently working for has a lot different kinds of data on any one report at anyone time.

    341 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.