Query_arg to take an existing custom select field from front end submission form

Support MB Frontend Submission Query_arg to take an existing custom select field from front end submission form

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #43651
    Salony MohantySalony Mohanty
    Participant

    hi - i have multiple custom post types.
    I have a custom post type that has post_title as a field, i am using query arg to create the dynamix selction - i am using user_id as $ current_user_id.
    i want to additionally limit to the custom_post type selected as the first drop down - for e.g. if i have hotel, restaurant as the selection available for first field, if the user selects hotel, only the hotel titles created by user should show up for second dependent field with post_title. How to achieve this with query_args or validations?

    #43665
    PeterPeter
    Moderator

    Hello Salony,

    You can create a custom callback function to show the options for a select field based on a condition, here is an example https://support.metabox.io/topic/callback-function-with-optgroup/?swcfpc=1#post-43255

    but the options will show on page loaded, not on a selected from another field. You will need to create some custom JS code to do that.

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