Gossamer Forum
Home : Products : DBMan : Installation :

A Readonly record field

Quote Reply
A Readonly record field
Boo,

Read only is a good idea. Can it work in form fields that are generated on the fly?

<INPUT TYPE="TEXT" READONLY NAME="record" VALUE="$rec{'record'}" SIZE="8" MAXLENGTH="8" ></TD></TR>

But if somebody monkeys with a record number, does the true value overwrite that? No, it does not. Just checked.

much obliged,

Carolynn
Quote Reply
Re: A Readonly record field In reply to
I'm not sure which way it worked from what you said. Smile I've never used a READONLY tag in a form field.

What I would suggest is that you not use a field at all. Just print out the value of the field, like you have in html_record.


------------------
JPD





Quote Reply
Re: A Readonly record field In reply to
Hi again JPDeni,

As you know, I am trying to completely bulletproof this whole process. :>D

I must use this field as it is the numerical record number and -key- to the database.

If it's just printed out and NOT IN A FORM BOX, the field is regarded as empty.

"Readonly" only works with HTML 4, anyway.

What about a hidden field? How would you keep the field and its sequential number intact without printing it? (This field doesn't really need to be seen accept by the administrator.)

You see, if someone either purposefully or accidently changes the record number to a greater value - all the following records get skewed.

If you are using this value to keep track of your number of records, this would be a disaster. No?

Carolynn
Quote Reply
Re: A Readonly record field In reply to
You can put it into a hidden field

<input type="hidden" name="ID" value="$rec{'ID'}">

I wouldn't suggest using the counter to keep track of the number of records in your database, though. It doesn't account for deletions.


------------------
JPD