Radio buttons to display one of two titles in view
Permalink
I'm trying to make a block with a static header title and a textarea. The header title will be a choice between two, Header A and Header B. Radio buttons, just pick one to display after you add the block.
I've searched the forums and found a couple of examples but they just didn't work for me. Am I correct that it's a communication between the add/edit.php and controller.php? I have this for controller.php but I don't know what I should be writing for add/edit:
Sorry for being really clueless about this. Any guidance at all is very much appreciated in advance. Thanks.
I've searched the forums and found a couple of examples but they just didn't work for me. Am I correct that it's a communication between the add/edit.php and controller.php? I have this for controller.php but I don't know what I should be writing for add/edit:
public function getWhichHeader() { if (?) { $title .= "Header A"; } else { $title .= "Header B"; } }
Sorry for being really clueless about this. Any guidance at all is very much appreciated in advance. Thanks.
db.xml:
controller.php:
form.php (add/edit):
It's a checkbox, not a radio button like I intended, but it was a found script. The checked box's status is saved, but I can't figure out how to get any saved data, based on the saved check box, to show in view.php. Does anyone have any guidance or suggestions? Thank you so much.