|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
I have a form that submits to my action page. The action page processes the form fields and does what it needs to do with the info. My question is, is there a way to dynamically pull the form field names? That is, I want a standard action page that runs set steps but can do this for any form.
I know I can create a hidden field in my form that holds the field names with a comma-delimited list, but I don't want that extra step. |
|
#2
|
|||
|
|||
|
The variable #form.fieldNames# on the action page will have a comma-delimited list of all the form field names.
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian. How to Post a Question in the Forums |
|
#3
|
|||
|
|||
|
Exactly what I was looking for. Thank you!
![]() |
|
#4
|
|||
|
|||
|
field values
Quote:
Is there a similar way of determing form field values? |
|
#5
|
|||
|
|||
|
Quote:
I imagine that you would use evaluate() |
|
#6
|
|||
|
|||
|
No! This is a common mistake that new and intermediate CFer's make. They want to do this:
#evaluate( 'form.#myFieldName#' )# It works but it is not the best way, evaluate() is the slowest of all the CF functions (in fact it has an equivalent in every language and it is always the slowest function). Do it like this: #form[myFieldName]# Where FORM is a structure and myFieldName is the structure key name. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > Can you determine the form names dynamically? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|