Skip to main content
Participant
May 9, 2006
Answered

using hidden form field

using hidden form field

hi i am still kinda losst on what this concept is all about.
can anyone explain to me (help ) on what this is for .

how does the action page play a role in this?

thanks
This topic is closed to new replies. Start a new post to keep the conversation going.
Kronin555Correct answer
Participating Frequently
May 10, 2006
On a product edit page, you want to pass the immutable product ID so you know which product is being edited, but you don't want the user to be able to change it.

Be advised... even though hidden fields are "hidden", they can still be changed before submission (just not easily).

5 replies

Participant
May 10, 2006
thanks for the responses.

i get the ( benefits)
· Good for passing variables page to page without displaying the data.

· It allows you to submit form fields that the user is unable to edit.

Can you give me a actual example.
Translate
Kronin555Correct answer
Participating Frequently
May 10, 2006
On a product edit page, you want to pass the immutable product ID so you know which product is being edited, but you don't want the user to be able to change it.

Be advised... even though hidden fields are "hidden", they can still be changed before submission (just not easily).
Translate
Inspiring
May 9, 2006
Further to cfpb's answer, it allows you to submit form fields that the user is unable to edit. There are situations where you actually will display the information to the user, you just don't let them alter it.
Translate
May 9, 2006
Hidden form fields are good for passing variables page to page without displaying the data.

For example, if you have a user_Id for a customer, and it should ideally be present in the form scope for database input. You can use a hidden form field to pass the value without the user viewing the value on their screen.
Translate