[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 942
  • Last Modified:

Post Form in cflayout Area

Hi there,

I try to send a form values from a cflayout area to another one.

Here is the Code.

The goal is to send value from the form to the center layout.

thanks in advance.
<cflayout name="thelayout" type="border">
 
 
<cflayoutarea name="left" position="left" closable="false" collapsible="true" splitter="true" style="height:100%; width:300px;">
<cfform >
<cfinput type="text" name="type">
<cfinput type="submit" name="submit">
</cfform>
</cflayoutarea>
 
<cflayoutarea name="center" position="center" style="height:100%;">
<cfdump var="#form#">
</cflayoutarea>
 
 
<cflayoutarea name="right" position="right"  closable="false" collapsible="true" splitter="true" style="height:100%; width:60%;">
 
</cflayoutarea>
 
</cflayout>

Open in new window

0
quarkmike
Asked:
quarkmike
1 Solution
 
azadisaryevCommented:
try this:

1) create a simple .cfm page - let's call it formaction.cfm - to process your form. you can just put your <cfdump var="#form#"> in it.

2) add a NAME attribute to your cfform tag if you do not have one. i will assume the NAME is 'myform' for now...

3) in your cffrom change
<cfinput type="submit" name="submit">
to
<input type="button" vane="submit" value="submit" onclick="ColdFusion.navigate('formaction.cfm', 'center', null, null, 'post', 'myform');">

that worked fine in my test.

see full samle code attached.

Azadi
<!--- CFLAYOUT page --->
<cflayout name="thelayout" type="border">
 
<cflayoutarea name="left" position="left" closable="false" collapsible="true" splitter="true" style="height:100%; width:300px;">
<cfform name="myform">
<cfinput type="text" name="type">
<input type="button" vane="submit" value="submit" onclick="ColdFusion.navigate('formaction.cfm', 'center', null, null, 'post', 'myform');">
</cfform>
</cflayoutarea>
 
<cflayoutarea name="center" position="center" style="height:100%;"></cflayoutarea>
 
<cflayoutarea name="right" position="right"  closable="false" collapsible="true" splitter="true" style="height:100%; width:60%;"></cflayoutarea>
 
</cflayout>
 
<!--- form action page (formaction.cfm) --->
<cfdump var="#form#">

Open in new window

0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now