Dynamically pre-populating dropdown field from ACF repeated subfield

Hi, I’m not a expert programmer and trying to figure out what can be done by using Gravity Form and ACF.

I have an ACF repeater field ‘new_course_date’ and following by sub-fields ‘new_start_date’ and ‘new_end_date’. The maximum row of repeated field set to 10.

I’m looking to populate a date field (if possible) or dropdown field on gravity forms with the subfield ’new_start_date’.

There will have another 2 hidden date fields (for admin-only) populate automatically based no the ‘new_start_date’ which are Day 2 and Day 3 respectively.

Could anyone direct me to any existing code snippet or give me a shove in the right direction? I was looking to this on GitHub and trying to figure out how it works.
Reference: Populate Gravity Forms dropdown field with Advanced Custom Fields repeater values. · GitHub

Thanks!

Regards,
Yan

Hi Yan,

You could accomplish this with GP Populate Anything and the following snippets:

The first snippet will adjust the ACF date format so it populates into a Gravity Forms Date field. The second will let you make calculations based on that date to return the Day 2 and Day 3 dates.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.