Forum Moderators: open

Message Too Old, No Replies

Disabled radio boxes problem

Disbaled radio boxes not passing info on

         

Karl

2:20 am on Jun 1, 2007 (gmt 0)

10+ Year Member



Hi there
I am using PHP to generate a set of radio boxes that are to be disabled (when a non-admin user logs in)

e.g. <input type="radio" name="available" value="TRUE" disabled="disabled">
etc

This all work fine, however even though I dont want the user to be able to change this data (hence the disabled radio boxes) I still want them to be able to see it, as it's relevant to other data in the form that they CAN change.

My problem is at the other end - the form doesn't send the disabled data. I still need to find out what the radioboxes were set to, but if they're disabled, nothing comes through.

Is there another way to make a radio box read-only while still allowing the data to be read by the script that's processing it?

Thanks
Karl

[edited by: Karl at 2:21 am (utc) on June 1, 2007]

daveVk

5:55 am on Jun 1, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Perhaps generate something like this?

<input type="radio" name="Xavailable" value="TRUE" disabled="disabled"><input type="hidden" name="available" value="TRUE" >

Karl

7:01 am on Jun 1, 2007 (gmt 0)

10+ Year Member



That should be perfect -Thanks, I'll give it a go! :)