Topic: EFORM inside of a toggle button  (Read 486 times)

Pages: [1]   Go Down

#1: 1-Jun-2009, 07:47 AM

sjscosta
Posts: 174

Hello,

In my website i have got one webform inside of a toggle button. By default this toggle button is collapsed.

I had a problem that when I submit the webform if I have a error the error message was hide....
And I need to use a javascript for show the errors of the form but when I fill the wrong captcha I don't have a error message...

How can I show a message error that don't stay hide?

Please could you help me?

Thank you

#2: 1-Jun-2009, 07:50 AM

Coding Team

sottwell
Posts: 10,502

WWW
I would suppose that you would need to add some javascript to the toggle code that makes the form's block be open if the element containing the error message was not empty.
sottwell.com has moved to a lovely Solaris 10 server!
Log in username guest, password guestuser.
Templates are now becoming available at http://sottwell.com/templates.html

#3: 1-Jun-2009, 08:09 AM

sjscosta
Posts: 174

Please could you inform how can I save the error in a field

#4: 1-Jun-2009, 08:39 AM

Coding Team

sottwell
Posts: 10,502

WWW
Quote
[+validationmessage+] - This should be somewhere in your form template or document. It is used for any validation error messages. From 1.4.2 the way the placehloder is entered has changed. Firstly you no longer need to place it in the form template. You can now place it anywhere in your document (or even in the global page template). Secondly you don't need to place any hml tags around the placeholder (in fact you probably should not). Any html markup is now included in the $_lang['ef_validation_message'] variable in the eform language files (which you can change as required).
When there is an error, eForm generates new content, taken from the lang file. The English version:
Code:
$_lang["ef_validation_message"] = "<div class=\"errors\"><strong>Some errors were detected in your form:</strong><br />[+ef_wrapper+]</div>";
You use the [+validationmessage+] placeholder to position this div element on your page. Your javascript could look for this div (or you could modify this to whatever you choose) and open the toggle block if it exists or is not empty.
sottwell.com has moved to a lovely Solaris 10 server!
Log in username guest, password guestuser.
Templates are now becoming available at http://sottwell.com/templates.html

#5: 1-Jun-2009, 11:03 AM

sjscosta
Posts: 174

I think that I can explain me  Embarrassed
In my website : http://www.oceanicoresidenceclub.com/prestige_residence_club.html

I have a button that you click and show the webform, but if you submit the webform with all empty fields you have a error message that stay hide in the button....

Please you could tell me if it is possible put the error :
<input name="error" type="hidden" value="Huh??" />

This form I can verify the error with javascript language

#6: 1-Jun-2009, 11:09 AM

Coding Team

sottwell
Posts: 10,502

WWW
You can edit the language file to have any format you choose, and you can put the placeholder tag for it anywhere in the document you please. Personally, I would simply change the language file to give the div tags an ID (<div id="errormessage">) and use the getElementById function to look for it in my javascript.
sottwell.com has moved to a lovely Solaris 10 server!
Log in username guest, password guestuser.
Templates are now becoming available at http://sottwell.com/templates.html

#7: 2-Jun-2009, 03:48 AM

sjscosta
Posts: 174

Thank you for your constant reply...

I try to do your solution, but when I submit the webform, if I have error, I don't get see the error, just when I submit the second time I have that error.
Please you can see in this link
http://oceanicowebprojects.oceanicogroup.com/modx-OPRC/prestige_residence_club.html
Pages: [1]   Go Up
0 Members and 1 Guest are viewing this topic.