How do I change the value of a edit field with code?
Posted: Tue Sep 03, 2024 3:58 pm
I have a form on the index.php page and have session storage enabled. I named all the form fields (id) appropriately.
On a separate page (results.php) I have a form with session storage enabled, the form fields (id) are named the same and it shows the form data perfectly.
However, I would like a drop down value to be the actual text (ie. it displays 1, but should be "Option A")
Same with radio or checkboxes. Instead of a 0 or 1, I would like it to say Yes or No (ie. it displays 0 but should be "Yes")
How do I code the form or edit field to change the result to the text value?
I hope I am explaining this well. Sorry if I am not.
Mike
On a separate page (results.php) I have a form with session storage enabled, the form fields (id) are named the same and it shows the form data perfectly.
However, I would like a drop down value to be the actual text (ie. it displays 1, but should be "Option A")
Same with radio or checkboxes. Instead of a 0 or 1, I would like it to say Yes or No (ie. it displays 0 but should be "Yes")
How do I code the form or edit field to change the result to the text value?
I hope I am explaining this well. Sorry if I am not.
Mike