Hi, i have several Cred Userforms and CPT-Forms. Many of them use the same fields, for example "Name, email, password".
The fields are using a lot of CSS, JS and Bootstrap customization. It is a pain changing every single form when changing anything small like a tooltip. I was hoping that it is possible to use templates for those fields to insert in the forms.
I tried it like this:
[wpv-post-body view_template="user-formular-sektion-id-mit-passwort-sek_konto" suppress_filters="true"]
and it works! Everthing is fine and works, fields are showing up and saving values as expected. The only thing that doesn't work is the form notification, it does not show up the email field in Settings – because email is in a template.
I could live with it, when i am not able to put email - field in a template but i wanted to ask if i should avoid working with templates for cred-fields, or is it fine to do this? I could not find any answers in old Support posts.
Kind Regards
Fatih
Hello,
The shortcode [wpv-post-body] is for displaying post information, you can try to use "item" attribute to specify the post, for example:
[wpv-post-body view_template="user-formular-sektion-id-mit-passwort-sek_konto" suppress_filters="true" item=123]
Please replace 123 with the specific post ID
More help:
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-post-body
The “item” attribute is used to get the context when retrieving data from a post that is different from the current one.
Hi, I know what toolset meant the templates to be. But my need is understandable isn't it? Everything in Toolset gets nested and reused but forms always need a lot of redundant work, field-templating is not such a bad idea isnt it.
is it something you would not recommend, tough it works?
Wich post ID should get placed there? The Post where the form will show? or the template ID? Can you explain please?
Since everyone seems to use blocks i am hoping that the good old "legacy" mode stays forever and i can ask questions like these. In blocks everything feels slow and redundant. I liked the way toolset made everything possible ... since blocks everthing seems less flexible and a lot of things got more difficult because they meant to be more easy to use ... with fancy gui. I tried blocks for 2 Months. Does not work for my needs ...
I assume we are talking about user form, and you are going to display the user's custom user fields in the email notification content, if it is, you can specific the user's ID like this:
[wpv-user field="user_email" id="%%USER_USERID%%"]
More help:
https://toolset.com/course-lesson/send-notifications-when-someone-submits-the-form/#displaying-user-information-in-notifications
section "Displaying User Information in Notifications"
It is not recommended to use content template shortcode in user form.
It is about using groups of formfields in multiple forms, instead of copy paste these fields. Not the content, the fields themselves. Not in notifications.
Did you understand? It is working, my question is, if i should avoid this for whatever reason …
As I mentioned above, it is not recommended to use content template in Toolset user form, content template is for displaying post information, but in Toolset user form is not post/page, so it might conduct other unexpected results.