I have the following line of code:
<input id="b_first_name" type="text" name="b_first_name" class="required"
value="<?= $this->settings['fill_form'] ? "Bob" : "" ?>">
Is there a cleaner way to write this? I don't like writing a ternary where one side doesn't need output, it feels dirty. I am looking to output "Bob" ONLY if the setting "fill_form" is set to true. I wish I could something like this, but neither work:
<input id="b_first_name" type="text" name="b_first_name" class="required"
value="<?= $this->settings['fill_form'] ? "Bob" ?>">
or
<input id="b_first_name" type="text" name="b_first_name" class="required"
value="<?= if ($this->settings['fill_form']) "Bob" ?>">