Skip Navigation

[Resolved] I want to add an email field from a venue to an event Post Form

This support ticket is created 2 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 6 replies, has 2 voices.

Last updated by Shane 2 years, 7 months ago.

Assisted by: Shane.

Author
Posts
#2334487

Tell us what you are trying to do?
When I add a prospective event to a venue with an add post form, I want the venue to receive an email. I hoped to use the venue's email address field in the post form, but cannot add related fields there,
I am able to automatically display the venue's name (Post title of venue) with the "parent ID", but would like to choose the venue's email address too.

I can add the email address to the post that is created, but then the venue will not receive a notification of the client's request.

Is there any documentation that you are following?
Yes, I have been looking for a whole day to find a solution on your website.

Is there a similar example that we can see?
This is one venue:
hidden link

This is the post form for a prospective event for this venue:
hidden link

What is the link to your site?
The development site: hidden link

thank you for your help.
Jan Tetteroo

#2334623

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Jan,

Thank you for getting in touch.

Is the post form on the page where the event is ? Meaning you're filling out the form on the event page.

If so then you can simply create a generic email field and for the value you will add [types field='my-field'][/types] where my-field is the slug of the email field that is used on the events page.

From there you should be able to setup an email notification for this field. If not then you will need to switch the form to expert mode and under that generic email field you will add persist: 1

Please let me know if this helps.
Thanks,
Shane

#2334637

Hi Shane,

Thank you for your answer. The email address comes from the venue page. It is not generic. It should be transferred from the venue to the event.

Venue 1: hidden link

Venue 2: hidden link

If you scroll down, the venue email address is visible. You can see it is different for each venue.

The link above the email address is to fill a Post Form, but I still see now way how to add that to the post form in a way it will trigger a notification when the post is saved.

Kind regards, Jan

#2334663

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Jan,

I'm assuming that this is the form
hidden link

Would you mind allowing me to have admin access to the website so that I can help set this up for you.

Thanks,
Shane

#2335343

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Jan,

Thank you for the credentials.

I've created a custom shortcode and added it to your site called [get_parent_email] . This custom shortcode was added to the generic email field in your form at the link below.
hidden link

The field is called email. However for this field to be available in the notifications you must add persist: 1 to the generic field structure when you're editing the form in expert mode.

Given that your form is simple then it should be easy to switch to the expert mode. However you won't be able to switch back without losing some of the changes to your form structure.

Please let me know how best you want to proceed with this.

Thanks,
Shane

#2339093

That kind of works. But we run into the problem that the one posting the form can change the email of the venue. I would like to have it fixed (like the name of the venue on top of the form) or even invisible

#2339095

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Jan,

You can simply use css to hide the field.

Wrap the field in a div with the class hidden and then use the css below to hide it.

.hidden{
display: none;
}

Thanks,
Shane