Skip Navigation

[Resolved] wrong custom fields show up on front-end submission form

This thread is resolved. Here is a description of the problem and solution.

Problem: Field groups from the wrong post type are appearing on my form.

Solution: Be sure to set the post types for each field group in the field group editor, then create forms once the field groups are applied.

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.

This topic contains 4 replies, has 2 voices.

Last updated by trishaT 1 year, 2 months ago.

Assigned support staff: Christian Cox.

Author
Posts
#2010071

Tell us what you are trying to do? I am creating a front-end submission form

Is there any documentation that you are following? I am going step by step with the video tutorial on front end form creation

Is there a similar example that we can see? You can see on this page: hidden link I am building the form for Mentors, and all the fields are there. But also the fields are there for Organizations, Directories, and Books (all the fields I have created for all my post types.) Many of them are locked (because they are required) - and that means I can't just remove them from the form.

What is the link to your site? hidden link

(I just submitted another ticket about the fields, drop and drag. There is WP Admin access in that submission.)

#2010101
Screen Shot 2021-04-04 at 5.04.31 PM.png

Hi, it looks like your field groups for Directories, Mentors, and Organizations are set up to be applied to All Post Types. When you edit each field group in Toolset > Custom Fields, you can choose which post types each field group will be applied to. I suggest you edit each of these field groups and choose specific post types for each field group, so that the Form builder will be aware which fields should appear in Forms for each post type. Then when you create a Form for a specific post type, the unnecessary fields will not be included.

Let me know if that does not solve the problem here. You may need to generate a new Form for the field assignments to take effect.

#2011161

Christian - thank you for this. I was able to assign the post types to the fields, so that worked.

But now I have a different problem that seems associated. I took your advice and built a new form (trashed the other one.)

I created a new page, and found the form block type, and assigned the new form.

When I look at the new page: hidden link I can see the form on the page in Chrome. But the form does not appear on either Edge or Firefox. Further, I can't get it to appear in any of the browsers I have on my android tablet or phone.

What can I do to get my forms to appear? Thanks.

#2011171
Screen Shot 2021-04-05 at 2.33.45 PM.png

Okay great, it sounds like the fields issue is mostly resolved. I suspect the Form visibility behavior you've described is more related to User login status than it is to browser type. I am unable to see a form here, and I am using Chrome:
hidden link
I suspect you were logged in as an administrator in Chrome but not in the other browsers, hence the difference you saw on the front-end. By default, guest Users are not allowed to create posts using Forms. The entire Form will be hidden in this case. To customize those capabilities, you can use the Toolset Access plugin to manage permissions per User role, per Form. Go to Toolset > Access Control > Toolset Forms tab to adjust the capabilities matrix for each Form function / role combination. You can see the Access Control settings for an example site in the screenshot here - roles below the "Author" level are not automatically granted access to create posts with Forms. If you have additional questions about managing permissions for Forms, I suggest we split off a separate ticket to discuss that in more detail.

#2012669

My issue is resolved now. Thank you!