Support

Account

Forum Replies Created

  • @aaronpie I did resolve this, but it was long ago and the project is now defunct. If I come across any code for this I’ll let you know.

  • Nice, that’s very close to where I got to. Thanks so much!

  • With one small addition it worked:

    if (have_rows('repeater_field')) {
      while (have_rows('repeater_field')) {
        the_row();
        $name = get_sub_field('name_field');
        $title = get_sub_field('title_field');
        echo $name->name,': ',$title[0]->name;
      }
    }

    Each name may have multiple titles, so would there have to be another loop within to get all of those?

  • Ack, I’m an idiot and confused two things, and maybe didn’t explain clearly enough. My apologies for wasting a bit of your time.

    I do have a text field on the option page already, and it already dynamically populates the CPT select field.
    One of the parameters of this project is to be able to dynamically populate from the CPT edit page, without needing to go to the options page. Either via a textarea field on the post editor page, or just adding a new option into the select box itself. As you mentioned this might pose a challenge, unless you’ve thought of something else!

    Thanks

  • I don’t have a textarea field with all choices… and upon further reviewing it looks like I should have. That’ll be easy That should be easy enough for me to change though. How I originally had it (because of project scope at the time) was to have a name and instrument associated together. But how I have it now is names by themselves in a repeating text field in an options page.

    So your saying that if I have a textarea field, the select options can be dynamically populated by each line within the textarea? (Just making sure that what I just re-read is correct)? Sometimes I’m confused by the docs – which is often me not knowing enough.

    Perhaps this can be a feature request for a future version? I’m sure you’re totally not busy with anything else and can drop everything for that 🙂

Viewing 5 posts - 1 through 5 (of 5 total)