Support

Home Forums Event Espresso Premium Set a default state in address form

Set a default state in address form

Posted: May 13, 2020 at 2:16 pm


ideametrics

May 13, 2020 at 2:16 pm

I saw Josh’s note (and offer to write one) on https://eventespresso.com/topic/set-default-state-on-form/ that a jquery can be written to default state in the drop down. I need to default state to Pennsylvania.

How do I set this up.


Tony

  • Support Staff

May 14, 2020 at 7:11 am

Hi there,

You can use something like this:

https://gist.github.com/Pebblo/d2b24f3a8a8713146e495c3a9cc2e3e1

You can add that to a custom functions plugin on your site and we have some documentation on creating one here:

https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/

Now the ID of your states may be different than on mine (they should be but its possible) so this may need to be altered slightly to work. If you add the above and it doesn’t set the state please link me to a test event I can view so I can take a look.

You must be logged in to reply to this support post. Sign In or Register for an Account

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3 Documentation for Event Espresso 4

Status: publish

Updated by  Tony 1 week, 6 days ago ago

Topic Tags

Notifications

This topic is: not resolved
Do NOT follow this link or you will be banned from the site!