specify which fields display on the frontend

Support MB Frontend Submission specify which fields display on the frontend

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #42214
    shmaltzshmaltz
    Participant

    Hi, can I specify which fields from a field group display on the frontend?

    I can't use the "hide from frontend" feature on the field because some users will need to have the field on the frontend.

    I am using a condition to load a different form shortcode to different users.

    Thanks

    #42232
    PeterPeter
    Moderator

    Hello,

    You can use the option "Hide from frontend" to hide a specific field on the frontend. If some users need to have the field, then you will need to create a group for a specific user (you) or user role. Please use the option "Advanced location rules" (MB Include Exclude) in the field group settings.
    Refer to the documentation https://docs.metabox.io/extensions/meta-box-include-exclude/

    #43573
    YasmineYasmine
    Participant

    For this, if you create a separate field group with advanced location rules but then embedded those fields into the same form (eg in a php file), under a different field group ID, then would the advanced location rules still apply?

    #43582
    YasmineYasmine
    Participant

    With the hide from frontend, that hides full metabox groups and so you need to have it [block A - for x user], [block B - for y user], [block C - for all users]

    Instead I have it:
    field 1 - for all
    field 2 - for x user
    field 3 - for y user
    field 4 - for all

    So it is embedded. There seems to be no conditional logic for user_role per field, so wanting to understand how can best achieve that. Unless I got it wrong with the Include Exclude.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.