Subject: | Adjusting empty_first on existing form |
A form setup by yml file is being adjusted to have an empty_first label
set. The below code snippet does not work as expected.
my $firstTag = $form->get_field('first_tag');
$firstTag->empty_first_label('[ Select Category ]');
$firstTag->empty_first(1);
This code snippet does:
my $firstTag = $form->get_field('first_tag');
my $options = $firstTag->options();
$firstTag->empty_first_label('[ Select Category ]');
$firstTag->empty_first(1);
$firstTag->options($options);
The empty_first value is prefixed onto _options as part of setting
options. Ideally it would be setup during the rendering stage and not
earlier.