1955 Posts in 1234 Topics by 601 members
|Go to End|
13 August 2013 at 7:33am Last edited: 13 August 2013 7:35am
I created a very simple page type with a form on it. Extension of Page not form. I saw a tutorial and it looked simple enough to reproduce. I got everything to work in the sense that if I called the entire form IE: "$MyCustomForm" in my templates, the entire form shows up and submits to the database I've told it to, and it works well. Including required fields.
Now, when I loop through the form to get individual fields via $Fields.fieldByName('FirstField') that shows up find as well. I do the same for $Actions and then $Field for actions to get my submit button to show up at the end. I did it this way so I can have find tuned control over what the page itself will look like. And while the template works well, the submit button does not. It doesn't even fire. No error, and in chrome during expect element nothing gets pushed or passed through php either. Its sitting there with class attributes but feels essentially like an empty button.
Any ideas why this could be happening? That calling the entire form straight works perfectly. But calling each field manually/separately causes the submit button to stop working?
Thanks in advance.
NOTE: Am using SS 3.0.5 on a Dreamhost Dedicated Server with bootstrap 2.3 (which I will be moving to foundation 4 soon enough)
14 August 2013 at 8:10pm
15 August 2013 at 10:33am
Nothing would happen at all when clicking submit. As if it was an image. The only that would work was the hover over effect on the button itself.
I figured out after looking at the html outputs that it might have something to do with the hidden input fields regarding the security token, then confirmed it on the IRC channel when they mentioned the CSRF token check and low and hold it was. It was also me no including the <form> tags along with $FormAttributes, hence the button wasn't being seen.
All working now with <form $FormAttributes></form> adding to the form area and <% loop HiddenFields %>$Fields<% end_loop %> on the template file.
|Go to Top|