I have built a custom form with a page contents bodycopy so I can manage the layout of the questions/input fields. I am able to get the questions/notes/fields to show up in the form correctly using the % markers (i.e. %form_name_blah_q1%). However, the %form_errors% and %form_errors_message% markers aren't working. I have all fields in the form set as required and an email validation rule on one of the fields. The validation is working (i.e. I can't submit if I don't fill in all fields or don't enter a valid email address) but the errors aren't showing even though I've put in the %form_errors% marker.
Is anyone able to advise something I can try to resolve this, or point me in the right direction? I have gone through the custom form manual but it hasn't really helped me solve this. I've tried manually typing %form_errors% into the wysiwyg editor and I've also tried just entering it via the select list of keywords (where it's labelled List of Submission Errors) but neither have worked.
I'm at a loss. Hope someone can help.
Thanks.
[quote]
I have built a custom form with a page contents bodycopy so I can manage the layout of the questions/input fields. I am able to get the questions/notes/fields to show up in the form correctly using the % markers (i.e. %form_name_blah_q1%). However, the %form_errors% and %form_errors_message% markers aren't working. I have all fields in the form set as required and an email validation rule on one of the fields. The validation is working (i.e. I can't submit if I don't fill in all fields or don't enter a valid email address) but the errors aren't showing even though I've put in the %form_errors% marker.
Is anyone able to advise something I can try to resolve this, or point me in the right direction? I have gone through the custom form manual but it hasn't really helped me solve this. I've tried manually typing %form_errors% into the wysiwyg editor and I've also tried just entering it via the select list of keywords (where it's labelled List of Submission Errors) but neither have worked.
I'm at a loss. Hope someone can help.
Thanks.
[/quote]
Firstly, welcome to the Matrix Forum.
Is the %form_errors% keyword included within tags or a cell which may contain a different style (eg; white text on a white background)?
Maybe some surrounding HTML tags have not been closed and are being interpreted as tag contents rather than text.
If this is set up according to the instructions in the manual, these are the only possible explanation I can offer at the moment.
[quote]
Firstly, welcome to the Matrix Forum.
[/quote]
Thanks Mark. And also thanks for the response below - greatly appreciated.
[quote]
Is the %form_errors% keyword included within tags or a cell which may contain a different style (eg; white text on a white background)?
Maybe some surrounding HTML tags have not been closed and are being interpreted as tag contents rather than text.
If this is set up according to the instructions in the manual, these are the only possible explanation I can offer at the moment.
[/quote]
This is what it looks like:
<p><span style="font-weight: bold;">Form Title</span></p> <p>paragraph of text, no tags</p> <p>single line of text, no tags</p> <p><b>%form_errors%</b></p>
Then I have the layout of the form underneath it.
It's not a very complicated form, so I feel confident saying there are no extraneous or non-closed tags that could be causing the issue - and the above is a cut and paste of what the html view of the form looks like up to the %form_errors% marker (obviously the text is different because it's internally sensitive, but it's not formatted, no links, etc). Why I'm so confused is the rest of the markers display absolutely perfectly. I've tried moving the %form_errors% to different places in the form, but that hasn't worked either. I'm a sad panda, because putting together this form and laying out the fields how I wanted was so dead easy, but now getting stuck on error display is frustrating.
[quote]
This is what it looks like:
<p><span style="font-weight: bold;">Form Title</span></p> <p>paragraph of text, no tags</p> <p>single line of text, no tags</p> <p><b>%form_errors%</b></p>
Then I have the layout of the form underneath it.
[/quote]
If you haven't tried already, have a look at the generated source code from the browser.
Any errors should be listed as <li> (list) elements. If they are in the code, then perhaps again a stylesheet colour or positioning configuration might be causing this to occur.
If possible also try on a fresh form with one text question to see if this is particular to the site / design under which the form resides or question rule configuration. Testing in greater isolation will narrow the possible causes.
[quote]
If you haven't tried already, have a look at the generated source code from the browser.
Any errors should be listed as <li> (list) elements. If they are in the code, then perhaps again a stylesheet colour or positioning configuration might be causing this to occur.
If possible also try on a fresh form with one text question to see if this is particular to the site / design under which the form resides or question rule configuration. Testing in greater isolation will narrow the possible causes.
[/quote]
I just had a look at the source code after submitting the form (so when the errors should be showing) but the section where the %form_errors% marker is displayed is empty (i.e. no errors listed).
I'm going to set up a 2nd form with 1 question as you suggested and see if I can get that to work. I'll report back shortly.
Again, thank you for the help.
I just did a test form and the %form_errors% part is working.
Now, I've just realised there's a piece of pertinent information I left out (sorry!). I created a section and put the questions in that section (the form may have multiple sections down the track and I wanted to split them up nicely and make them a bit more manageable).
Is there a specific section based tag for %form_errors% that I'm missing? That might explain why the form I just set up and the form I'm having trouble with are operating differently.
[quote]
I just did a test form and the %form_errors% part is working.
Now, I've just realised there's a piece of pertinent information I left out (sorry!). I created a section and put the questions in that section (the form may have multiple sections down the track and I wanted to split them up nicely and make them a bit more manageable).
Is there a specific section based tag for %form_errors% that I'm missing? That might explain why the form I just set up and the form I'm having trouble with are operating differently.
[/quote]
Okay, it must have been a malformed something somewhere… I just rebuilt my form based on the test I did above (included the section still) and it's all working.
Thank you for your help - not sure what the problem was, but I'm just glad it's fixed, and your ideas helped me at resolve it!
[quote]
Okay, it must have been a malformed something somewhere… I just rebuilt my form based on the test I did above (included the section still) and it's all working.
Thank you for your help - not sure what the problem was, but I'm just glad it's fixed, and your ideas helped me at resolve it!
[/quote]
Glad it worked out. Cheers