Okay well I know nothing about html programming but somehow got stuck with building our branch’s internet site and implementing a few projet log type cold fusion database things.
So I built a form with a bunch of checkboxes. User goes to form, checks a bunch of boxes, submits. This works great.
User wants to edit what they’ve checked so they click on “edit”. This goes to a new form though it looks the same so they can’t tell. What I want to know is, how can I get it to show the boxes they checked the first time? Right now I’m just recreating the input boxes so I don’t know how to tell it to get the information already submitted and show that (e.g. “if it was checked before check it now”).
I don’t know **any **javascript so if you recommend some code please explain it and where it goes!
Well all that does is automatically check the box. What I need to know is if it was checked before then check it now otherwise leave it blank.
Actually I figured it out. I had already done it in another place and forgot I had done that but once I found it I realized what an idiot I am. Simply use a query from the database and then insert a <cfif> statement into the input type so it looks like this:
<input type="checkbox" name="mycheckbox" <cfif #myquery.checkboxItem# is 1>checked</cfif>>
well, the cfif tag inside the html is coldfusion . . .
it’s a cold fusion if statement as opposed to some other language if statement, like they’ve got some kind of ownership on an if function :sure:
unfortunately i know very little of programming - just a bit of html, actionscript, and coldfusion (and all based on the one year of C++ I had in school). Enough to get me in trouble and make me look dumb by asking simple questions.