Skip Navigation

[Resolved] 2 fields from user form must be pulled to the user content template

This support ticket is created 3 years, 5 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Author
Posts
#2091241

Hi there,
We just had some feedback from the authorities that we have to meet in order to start our company.

One of them is that when a user creates a camp, there must by default be 2 things showing on the content template / the camp:
1) The field called "CVR-number" (VAT number)
2) The field called "Navnet på din klub" (The name of your club)

Both fields are being filled out by the host during the signup as a host-role here: hidden link

Is it possible to pull those 2 fields into the users content template when they create a camp? If you need a login please let me know

#2091243

Oh and the host must not be able to edit these 2 fields in the frontend or backend 🙂

#2091975
Screen Shot 2021-06-17 at 4.02.12 PM.png

Is it possible to pull those 2 fields into the users content template when they create a camp?
Hello, if the host is the post author of the Camp post, you can display the host's User fields in the Camp template using Types UserMeta shortcodes with user_is_author='true' like this:

[types usermeta='user-field-slug' user_is_author='true'][/types]

Replace user-field-slug with the slug of the custom field you want to display. You can place that shortcode in the Content Template for Camps to display the Author's custom field in the Camp post.
https://toolset.com/documentation/customizing-sites-using-php/functions/

Oh and the host must not be able to edit these 2 fields in the frontend or backend
If you do not include these fields in any Edit User Form, the host will not be able to edit the fields in the frontend of the site. If you want to prevent backend editing, You can use the User Field Group settings to show or hide a field group from specific User roles. See the screenshot here for details about that.

#2092249

Thank you for your reply Christian 🙂 I will try it out but it makes perfectly sense!

I am creating a new ticket since the content template looks weird again - one of the containers have a huge margin to the left and the map is missing in the frontend - even though both things looks normal and works in the backend editing. You can see this link: hidden link

#2094905

Ok understood, I will follow up there.