• Resolved icarusmanifest

    (@icarusmanifest)


    I have a custom user meta field. The data, a string, is shown with the shortcode

    [CF7_get_current_user key=”dropzoneID”]

    correctly. So far, so good. But I have to use this value as default value for a select input, where this meta data is an list element.

    How to get this string from the shortcode above a default value for a select?

    Thanks and best regards,

Viewing 1 replies (of 1 total)
  • Plugin Author Tessa (they/them), AuRise Creative

    (@tessawatkinsllc)

    Wonderful! If using the Form-tag generator, you’ll want to put just this part of the shortcode:

    CF7_get_current_user key='dropzoneID'

    In the “Selected Default” field (see image below of form-tag generator).

    The form tag generator screen for the dynamic drop-down menu (select) form tag.

    It should then populate the form tag with a default attribute and encoded value, something like this:

    [dynamic_select inputname placeholder:CF7_get_current_user%20key%3D%26%2339%3BdropzoneID%26%2339%3B include_blank "some_shortcode_to_return_values_as_json"]

    In order for the default attribute to work, the shortcode used to populate the options should return a JSON format like this.

    Cheers!

Viewing 1 replies (of 1 total)
  • The topic ‘custom user meta value as default value for select field’ is closed to new replies.