Home Forums General Issues From input (FE) to select or textarea (BE) Reply To: From input (FE) to select or textarea (BE)

  • I’m not sure I completely understand, but would something like this work?

    function append_url_to_field($new_input) {
      $current_values = get_field('list_of_urls', 'option')?:'';
      if($current_values) {
        $current_values .= ',';
      $current_values .= $new_input;

    You create a simple ‘text’ field on an options page/or other, and simply append it the new value to the existing value.

    Whenever you want to work with the domains you can use explode(',', $field_value) to get an array of urls.