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

Viewing 1 reply thread


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.

Viewing 1 reply thread

The support post ‘Set a default state in address form’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso