• Resolved leofromtheorck

    (@leofromtheorck)


    Hey everyone, I hope I did not overlook someone asking the same thing but I couldn’t find it.
    On my page, I need to create a form that allows users to pick an event date for a course. Every event has like 4-6 options. I created a custom post type (‘termine’/dates) for every event. In the custom posts for every event there are several custom fields (ACF). These fields contain the dates for the events. I use the ACF-Shortcode to display the dates everywhere else on the page.

    But the shortcodes do of course not work inside of a CF7 form-tag. So I am desperately looking for any solution to let users pick from a list (or group) of dates that gets populated by the content of the custom fields that are not empty.

    The idea is to not have to edit the form whenever a date is added, changed etc. I would be so glad if anyone had any hints regarding this!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    Thread Starter leofromtheorck

    (@leofromtheorck)

    Thank you so much for your reply! I will experiment with it a little further – but I was under the impression that default values will only work for text-type inputs? Can I set multiple default values for e.g. the dropdown-type? I am also not sure how to link the post_meta to my specific custom field? Sorry, I think I’m missing something.

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    You can use it for non-text input fields. Where can we see the actual contact form?

    Thread Starter leofromtheorck

    (@leofromtheorck)

    This is the form atm.

    The event-choices menu is just a dropdown element in which I added the events manually.
    Ideally I would want to populate this dropdown element with the post titles of my custom post type “termine”.

    I use conditional logic on this form, so the next step would be: When an event is chosen in the dropdown list, a new conditional group opens (that’s no problem of course) that contains the choices for the dates.

    Let’s say, the first event on the list has 3 different dates to chose from. Every date is in a custom field in my custom post type, so every date has it’s own shortcode (e.g. [acf field=”termin1_4153“ post_id=”4153“]). I would want the element (doesn’t matter if it’s dropdown, checkboxes or radio buttons) to pull the custom fields and use the content of each of the fields as an option.

    Thank you so much for your help!

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    Thread Starter leofromtheorck

    (@leofromtheorck)

    I will, but I am very sure that it has nothing to do with the conditional field since I can’t solve my problem even in a form without conditional fields, I just gave you the full example and background info of my form.
    The conditional fields don’t actually have to do with it, I did set up a form just to test what I am trying to achieve without any conditions and encountered the same problem. But I will experiment further with the default: option, maybe I will eventually figure it out or just face the fact that it won’t work like I want.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Populate checkboxes, radio-buttons, dropdown with custom field shortcodes’ is closed to new replies.