Skip to main content
Known Participant
November 11, 2008
Question

CFFORMS

  • November 11, 2008
  • 2 replies
  • 550 views
Is there a way to have multiple forms under a <cfformgroup type="panel">. The problem I am having is that the form validation kicks in when I attempt to submit any of the forms.

Example:
The ideal outcome would be that both forms could be submitted independent of each other.

<cfform action="myform.cfm" method="post">
<cfformgroup type="panel" width="700" height="800" label="Panel">
<cfformgroup type="accordion" width="685" height="600" label="Containers">
<cfformgroup type="page" label="Form 1" >
<cfinput type="text" required="Yes" name="firstName" label="First Name" value="" width="100"/>
<cfinput type="text" required="Yes" name="lastName" label="Last Name" value="" width="100"/>
<cfinput type = "submit" name="submit" width="100" value = "Submit Name">
</cfformgroup>

<cfformgroup type="page" label="Form 2" >
<cfinput type="text" required="Yes" name="Address" label="Address" value="" width="100"/>
<cfinput type="text" required="Yes" name="City" label="City" value="" width="100"/>
<cfinput type="text" required="Yes" name="State" label="State" value="" width="100"/>
<cfinput type="text" required="Yes" name="Zip" label="Zip" value="" width="100"/>
<cfinput type = "submit" name="submit" width="100" value = "Submit Address">
</cfformgroup>
</cfformgroup>
</cfformgroup>
</cfform>
    This topic has been closed for replies.

    2 replies

    Inspiring
    November 11, 2008
    You lose a lot of simplicity with the formgroups stuff. What is benefit?
    Inspiring
    November 11, 2008
    There is only one form in your sample code. What happens if you try it with 2?
    webhead_1Author
    Known Participant
    November 11, 2008
    The form does not display at all.