Support

Account

Home Forums General Issues Show sub-repeater options based on parent-repeater option selected Reply To: Show sub-repeater options based on parent-repeater option selected

  • To do this you will need to write JavaScript. You will need to attach an event to the first field that makes an AJAX request to the values for the second field and populate the values.

    Alternately you can create a script that gets localized with all of the values.

    Sorry, I do not have example code that I can supply for this.

    Here is an example https://stackoverflow.com/questions/5861090/populating-one-select-box-based-on-the-selection-in-another-select-box-jquery

    Info on AJAX in WP https://codex.wordpress.org/AJAX_in_Plugins

    Info on localizing scripts: https://developer.wordpress.org/reference/functions/wp_localize_script/