Support

Account

Forum Replies Created

  • After reviewing my field settings, I realized that I had forgotten to change the field type to select. So I guess that must have been it.

    Thank you, John!

  • So I’ve managed to store my select field’s value, by passing it to a hidden input field, which works fine. But now I’m facing some trouble with the repeater field.

    ACF generates a repeater’s subfield $field[‘name’] and $field[‘ID’], by replacing [acfcloneindex] by an $i integer value, through the use of javascript–see this post for reference.
    I haven’t found a way to get around the [acfcloneindex] riddle yet, but I’m wondering how ACF stores its own select fields values.

    I’m generating the select code of my field using the same structure as ACF, but ACF won’t store the value upon saving the post:

    echo '<select id="' . esc_attr($field['id']) . '" name="' . esc_attr($field['name']) .'" data-ui="0" data-ajax="0" data-multiple="0" data-placeholder="Select" data-allow_null="0">';
    $output .= '<option value="0"></option>';
    foreach($options as $option){
    ...
    }
    echo $output . '</select>';

    So the question is, what am I missing? How can I store my select field’s value?

    I figure there has to be a better way than by using hidden inputs, right?

  • All right, got it.

    ACF doesn’t render any options on ACF’s Field Groups admin page. I went to edit a post that the Field Group is associated with, and all the options of my new field render there.

    I’m fine with it, but it would be interesting to know, why nothing will render on ACF’s Field Groups admin page?

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