• I am using “selectable recipient with pipes” as detailed here https://contactform7.com/selectable-recipient-with-pipes/ and it’s really great and it’s working. But I would really like to add other elements like headings into the drop down, to organize the list. Specifically, I’d like to have a Canada heading followed by all Canadian provinces and territories that people can select, a United States heading followed by all U.S. states that people can select, and a “Rest of World” option that people can select. So it would look something as detailed here: https://thenewcode.com/166/HTML-Forms-Drop-down-Menus
    But I can’t seem reconcile Contact Form 7 rules with normal HTML drop-down code as shown at the bottom of my post, it just breaks the drop-down in Contact Form 7.

    <label for="state" accesskey="s">State / Province / Territory</label>
    <select name="state" id=state">
    	<option value="">-- choose one --
    	<optgroup label="USA">
    		<option value="AL">Alabama
    		<option value="CA">California
    		<option> … remaining US states … 
    	</optgroup>
    	<optgroup label="Canada">
    		<option value="AB">Alberta
    		<option value="CA">British Columbia
    		<option> … remaining provinces and territories … 
    	</optgroup>
    </select>

    Thank you so much for any help!

    The page I need help with: [log in to see the link]

  • The topic ‘Pipes with other drop-down elements’ is closed to new replies.