Navigation überspringen

[Gelöst] Notification to users when certain form is submitted

This support ticket is created vor 5 Jahren, 7 Monaten. 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)

Dieses Thema enthält 7 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von Shane vor 5 Jahren, 6 Monaten.

Assistiert von: Shane.

Author
Artikel
#1254487

Hi Support

Thanks for your help in advance.

We’re developing a site, and I’m a developer, and hopefully just need pointing in the right direction!

What we need is to send email notifications to the users of our site when a form is submitted.

It’s a single form, with 1 to ‘add’ and other to ‘edit’. The ‘post type’ the form is associated with has ‘Taxonomy’ of ‘Avon’. ‘Itchen’ and ‘Wylye’. The users will signup to receive email notifications from any or all of these ‘Taxonomy’.

An example:
1. User signs up to website and selects they want notifications for ‘Avon and Itchen’
2. Admin makes a new or edits an existing post using said form and selects ‘Avon’ ‘Taxonomy’
3. All users signed up to receive email notification from ‘Avon’ receive an email with the post content in

As mentioned above I just need pointing in the right direction.

Thanks

#1254505

Shane
Supporter

Sprachen: Englisch (English )

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

Hi Nathalie,

Thank you for getting in touch.

You will need to be looking on a subscription plugin in order to achieve this since its not something that can be done with our toolset plugins.
https://wordpress.org/plugins/email-subscribers/
Please let me know if this helps.
Thanks,
Shane

#1254581

Thanks Shane

Adding the subscribers part we can handle.

It's the part when the form is submitted, is there not 'hook' that is triggered after a form is submitted, and being able to access the Taxonomy in the hook?

Thanks

#1254623

Shane
Supporter

Sprachen: Englisch (English )

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

Hi Nathalie,

There is a hook that you can use .

This is the hook that we commonly use when we submit a post using our forms on the frontend.
https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data

Thanks,
Shane

#1254671

Thanks Shane

And with in the hook there is access to the post data including associated Taxonomy?

Thanks

#1255185

Shane
Supporter

Sprachen: Englisch (English )

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

Hi Nathalie,

Yes you can because the post ID is available from the hook.

So long as the post ID is available you can retrieve a posts taxonomy with the function below
https://developer.wordpress.org/reference/functions/get_the_terms/

Thanks,
Shane

#1259947

Hi Shane

Great, that makes sense.

Thanks

#1260245

Shane
Supporter

Sprachen: Englisch (English )

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

Hi Nathalie,

Awesome happy I was able to point you in the right direction.

May we close here?

Please let me know.

Thanks,
Shane