Skip Navigation

[Resolved] I cannot figure out how to get forms to work

This support ticket is created 5 years, 4 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
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by Beda 5 years, 4 months ago.

Assisted by: Beda.

Author
Posts
#1323499

I cannot figure out how to get the field data into the email notification form.

Here's my testing page: hidden link

I've created a Form (using Forms). I added an email field from the "Generic Fields". I gave it a field slug "email". I cannot, for the life of me, figure out how to get the value from that form into the email.

I've tried %%FORM_DATA%% -- and get nothing at all.

I've tried [types field="email"][/types] -- likewise.

How do I get the form data into the email notification??

#1323565

Generic Fields cannot be used to "persist" data unless you add Custom Code to save them on the Form's submit, or you use deprecated flags in the Generic Field to persist them.

Better is, using Toolset Types to create the Email Field for the Post or User you have Forms for.
That Field will be available as "Receiver" for the notifications and can be inserted in Notification Bodies by ShortCodes displaying the Types Field.

Generic Fields should be used for things that you don't need after submitting the form.
They are actually used more scarcely than Types Custom Fields, which are persisting to the posts they are assigned to, by saving their data in the post meta database table.
Generic Fields don't.

Please let me know if you have specific reasons to use a Generic Field because there are some possibilities of using them even in notifications, but it'd mean to save them somewhere, and that is basically already what a Types field does.

Thanks!

#1323635

I appreciate your answering on the weekend = I hadn't expected it.

Let me see if I understand: I cannot build a form with Forms, I must build custom code to support whatever form I build?

That isn't what I was looking for. The whole point is not to build custom code.

#1324973

That is exactly why you wouldn't use Generic Fields.

People use Generic Fields when they either do not need to persist them or use them in Custom Code.

If you do not need any custom action bound to the form reading Generic Fields, you can as elaborated simply use Toolset Types Custom Fields.
See https://toolset.com/forums/topic/i-cannot-figure-out-how-to-get-forms-to-work/#post-1323565:
Better is, using Toolset Types to create the Email Field for the Post or User you have Forms for.
That Field will be available as "Receiver" for the notifications and can be inserted in Notification Bodies by ShortCodes displaying the Types Field.

You can create all kind of fields in Toolset > Custom Fields.
Then, you create Toolset Forms for posts or users, and the Fields will be in that form and can be removed from/added to as well, in the Drag And Drop Editor.

You can see more details on Types Fields and Forms here:
https://toolset.com/documentation/user-guides/custom-content/#custom-fields
https://toolset.com/documentation/user-guides/front-end-forms/

The specific DOC on generic Fields is here https://toolset.com/documentation/user-guides/inserting-generic-fields-into-forms/, but unless you have specific needs for those, you will likely not use them in Toolset Forms, instead, you'll use Toolset Types Fields.

Is there a particular reason you need the fields to be generic in that form, means not saving?