Home › Forums › Bug Reports › acf/prepare_field incomplete? › Reply To: acf/prepare_field incomplete?
I’m looking at ACF Pro > includes > fields > class-acf-field-date_picker.php:
// elements
$div = array(
'class' => 'acf-date-picker acf-input-wrap',
'data-date_format' => acf_convert_date_to_js($field['display_format']),
'data-first_day' => $field['first_day'],
);
$hidden_input = array(
'id' => $field['id'],
'name' => $field['name'],
'value' => $hidden_value,
);
$text_input = array(
'class' => 'input',
'value' => $display_value,
);
Why can we not change the 3rd last line there to:
'class' => $field['class'] . ' input',
?
And do this consistently for all other field types?
For me, this is about applying Bootstrap 4 styles to the correct field elements for front-end forms. I can’t, because I can’t get to the input element to add a class, unless I make ACF (Pro) consistent in this way…
Is this a missing bit of code, or deliberate??
A
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.