• Resolved xaviern

    (@xaviern)


    Hi.
    I am using this plugin to make a form (obviously) but I have a <select> that requires <option value=”xxx”> because I have a script that when a person choose XXX option, another div is displayed, everything works but when I recieve the email, instead of recieving the text of the selected option I recieve the value of the option.
    Example:
    <select>
    <option value=”test”>A simple text</option>
    //script to display the div
    <div id=”test” display:none>TEXT</div>

    What I recieve on the email is this

    Chosen option: “Test”

    What I really want is to change “Test” and insert “A simple text”

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter xaviern

    (@xaviern)

    I also have some php code with some ifs that rename if option is test but where do I paste it?

    So why not change the value to “A simple text” as well for the select option, if that’s what you want to be the value.

    Hope that helps. If you have any questions, please let us know!

    Thread Starter xaviern

    (@xaviern)

    I already tried it but if I put spaces on value, my php to show/hide div display no longer works.
    This is my script for that:

    	$(function() {
            $('#colorselector').change(function(){
                $('.colors').hide();
                $('#' + $(this).val()).show();
            });
        });
    • This reply was modified 6 years, 11 months ago by xaviern.

    How about just adding the ID to the script directly, instead of using the value?

    $(function() {
    $(‘#colorselector’).change(function(){
    $(‘.colors’).hide();
    $(‘#test’).show();
    });
    });

    This way it does not depend on the value of the other field.

    I can’t go too far in providing support on custom code like this as these comes down more to Jquery questions than questions specific to our plugin, I hope you understand.

    Hope that helps. If you have any questions, please let us know!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Validation before submit’ is closed to new replies.