Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: Pass hard coded param CGI post

by marto (Archbishop)
on Jun 29, 2020 at 19:49 UTC ( #11118675=note: print w/replies, xml ) Need Help??


in reply to Re: Pass hard coded param CGI post
in thread Pass hard coded param CGI post

"Also, do NOT use the "readonly" attribute. The user wouldn't be able to modify the contents of that field"

That is probably exactly why they wish this to be read only. Don't allow it to be altered, maintain the same aesthetics. It's unlikely they had this there by accident.

Replies are listed 'Best First'.
Re^3: Pass hard coded param CGI post
by Anonymous Monk on Jun 29, 2020 at 20:06 UTC

    I don't get it, though -- it seems to be a form in which the user is to enter a "token" in the input field named "id". If that field is merely to show an existing value for a token ("id") that's already on file, then I would think the "id" field that had been marked readonly would have a "value='<TMPL_VAR ID_ON_FILE>'" attribute as part of its inoput tag, where a value would be supplied by a program that's using the form as an template (HTML::Template) or something.

      I don't believe we're getting the full picture, and there's no description of what OP is actually looking to do, however READONLY fields are useful in various circumstances, say for example a UI that allows users to delete something (as suggested here), prompting them with a page they can submit, cancel but not alter submission details for a record to be removed makes sense. Hopefully there is some sane, session based checks being made behinds the scenes, as it's fairly easy to mess around with such things if they are blindly accepting user input.

        Ah. I overlooked the sole point of the form -- to delete an existing entry rather than the typical editing screen. Thanks for this explanation and tip!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11118675]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2020-09-22 02:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If at first I donít succeed, I Ö










    Results (127 votes). Check out past polls.

    Notices?