Building form action attribute value

40 views
Skip to first unread message

Andrew

unread,
May 30, 2012, 8:02:45 PM5/30/12
to framew...@googlegroups.com
Hi,

How are people building the action attribute for form tags?

For example:

<cfoutput>
<form action="#buildURL('section.item')#" method="get">
    <input type="text" name="p1">
    <input type="submit">
</form>
</cfoutput>

Renders as:

<form action="/app/index.cfm?action=section.item" method="get">
    <input type="text" name="p1">
    <input type="submit">
</form>

When I submit this, it actually just submits to /app/index.cfm?p1 (ie the params on the form action are dropped off). 

This works:

<form action="/app/index.cfm" method="get">
    <input type="text" name="p1">
 <input type="submit">
<input type="hidden" value="section.item">
</form>

But then do we lose the option to being able to switch to SES URLs?

Am I missing something obvious?

Andrew.



Andrew

unread,
May 30, 2012, 8:03:45 PM5/30/12
to framew...@googlegroups.com


On Thursday, May 31, 2012 10:02:45 AM UTC+10, Andrew wrote:

<input type="hidden" value="section.item">




Should be

<input type="hidden" name="action" value="section.item">

Erik Meier

unread,
May 30, 2012, 8:07:43 PM5/30/12
to framew...@googlegroups.com
Try changing method="get" to method="post"

--
FW/1 on RIAForge: http://fw1.riaforge.org/
 
FW/1 on github: http://github.com/seancorfield/fw1
 
FW/1 on Google Groups: http://groups.google.com/group/framework-one

Andrew Myers

unread,
May 30, 2012, 9:08:34 PM5/30/12
to framew...@googlegroups.com
Thank you kindly Erik. That works.

Regards,
Andrew.
Reply all
Reply to author
Forward
0 new messages