My multi-select dropdown doesn't republish

To make a multi-select drop-down work so it reselects items when editing a record you need to do the following:

ChronoForms v4

  1. In your DB Record Loader action go to the Advanced tab.
  2. Add the name of the column you are storing the data in to the Array Field Sets property.
  3. Add the delimiter for the array to Array Separators property - usually a comma.
Posted by JeffP

ChronoForms v5

Unfortunately this function was left out of ChronoForms v5. Instead you have to use a Custom Code action after the DB Read action with code like this where 'my_column' is the name of the column data that you need to convert back to and array.

<?php
$form->data['my_column'] = explode(',', $form->data['my_column']);
?>

Note: repeat this code if you need to explode more than one column and check that the separator ',' matches the separator used in the database table.

Comments:

You need to login to be able to post a comment.