Hi guys,
We have a select_advanced field that is sourcing it's options via ajax. The ajax function gets and formats data from a custom table (used by MB Custom Table). We can successfully get and save data this way.
The issue is that I cannot see how to get and display the previously saved value's label. Our select_advanced field is in a cloneable group so it is not easy to just get the stored value from the database and then do a DB lookup to get hte label. Any thoughts??
array(
'name' => __( 'Event Name', 'indigo-metaboxes' ),
'id' => 'event_id',
'type' => 'select_advanced',
'options' => '', // presumably need a function here that can get the current value and do a DB query for the value to display...
'js_options' => array (
'ajax' => array(
'url' => admin_url('/admin-ajax.php?action=get_events_list'),
'dataType' => 'json',
'type' => 'get',
'delay' => '250',
),
'minimumInputLength' => 3,
'allowClear' => true,
'placeholder' => 'Choose event...'
),
'columns' => '4',
),
Thanks in advance,
Will