• EFORM inside of a toggle button#

  • sjscosta Reply #1, 2 years, 11 months ago

    Reply
    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


  • sottwell Reply #2, 2 years, 11 months ago

    Reply
    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.


  • sjscosta Reply #3, 2 years, 11 months ago

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


  • sottwell Reply #4, 2 years, 11 months ago

    Reply
    [+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:
    $_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.


  • sjscosta Reply #5, 2 years, 11 months ago

    Reply
    I think that I can explain me 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 :


    This form I can verify the error with javascript language


  • sottwell Reply #6, 2 years, 11 months ago

    Reply
    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> and use the getElementById function to look for it in my javascript.


  • sjscosta Reply #7, 2 years, 11 months ago

    Reply
    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