I made a Frontend form to post a custom post type: hidden link
But i need some fileds visible only for some user roles during the creation of post and some other visible in read-only.
I try with Access addon but fields still remain visible for all roles.
Can you help me pls?
Tnx a lot
Hello,
I suggest you try with Toolset Access shortcode [toolset_access] shortcode to display those custom fields, for example:
[toolset_access role="Administrator,Editor" operator="allow"]
Here display the custom fields
[/toolset_access]
More help:
Access Control for Contents Inside Page Content
https://toolset.com/documentation/user-guides/access-control/access-control-texts-inside-page-content/
Tnx a lot for help, works fine.....
but this trick create other problem.
I set access permission only for a specific user roles on a form field correctly.
When user with a different role try to add a new post by this frontend form doesn't see the field but when save the default value of this field is not stored.
how i can hide for a specific role a field (like you suggest me above with Access) but when form are sent, save the value anyway?
Tnx a lot
I integrate the previous post with a screenshot.
As you can see the field in views still appear empty when post saved from a user.
The second row have filed filled because i have edited it in backend and saved again.
Tnx a lot for help
How do you setup the default value of that custom field?
If that custom field is created with Toolset Types plugin, you can edit that custom field, in option "Default Value", setup the Default Value, see screenshot:
https://toolset.com/wp-content/uploads/2011/10/field-details.jpg
More help:
https://toolset.com/documentation/user-guides/custom-content/using-custom-fields/
Hi Luo, good morning.
As you can see on the new attacched screenshot i set a default value for my "Select" type field....
but is not saved when frontend form was submitted 🙁
Where is the mistake?
I assume the original question of this thread is resolved, according to our support policy, we prefer one question one ticket, for the new question, please check the new thread here:
https://toolset.com/forums/topic/save-the-default-value-of-this-field-is-not-stored/
My issue is resolved now. Thank you!