Skip Navigation

[Resolved] Dynamic populating select field from wpcf values

This support ticket is created 5 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 1 reply, has 2 voices.

Last updated by Christian Cox 5 years, 2 months ago.

Assisted by: Christian Cox.

Author
Posts
#1366645

Hi,

I have a custom post type called "Jobs" with a custom field with the slug "advertising-media". It is set as checkboxes.

When an admin user posts a job I would like then to check from a list of advertising media, for instance:

Media 1
Media 2
Media 3
Media 4

At the same time I have a gravity form which asks candidates where they saw the job advertised. This could either be a radio button or select field (I'm not too fussed). I would like this field to be dynamically populated from the options selected by the admin user. For instance if the admin user selected Media 1, 2 and 4 the candidate user will be presented the a drop down/radio button list of:

Media 1
Media 2
Media 4

How can I achieve this?

#1366749

Hi, I'm not a Gravity Forms expert so I'm not sure how to populate one of their fields dynamically. That's something you would have to ask their support team about. Is it possible to use a third-party shortcode to populate the field values? What syntax should the shortcode produce? Can they provide examples?

I can show you how to output checkboxes custom fields with Types shortcodes, however checkboxes are stored as serialized data in Types fields, so the options are notoriously difficult to merge with other systems:
https://toolset.com/documentation/customizing-sites-using-php/functions/#checkboxes
You can click the orange +More button to see examples of interacting with checkbox fields using shortcodes and PHP.