CMS MADE SIMPLE FORGE

CGBetterForms

 

[#11628] When multiple forms appear on a page, dispositions for all are run when submitting any

avatar
Created By: Lewis Howles (lewishowles)
Date Submitted: Fri Nov 03 05:06:46 -0400 2017

Assigned To:
Version: 1.1.4
CMSMS Version: 2.2.3.1
Severity: None
Resolution: Fixed
State: Closed
Summary:
When multiple forms appear on a page, dispositions for all are run when submitting any
Detailed Description:
FormBuilder is great, but I'm glad there's now an alternative that's built for
CMSMS 2.

I've noticed that when there are multiple forms on a page (such as an offer sign
up and a newsletter sign up), when one is submitted the dispositions for all of
them run, even though only the details for one form (including the GUID) are
submitted.

All forms then display a thank you message. This happens even if the primary
form hits an error.

All of my forms have an email disposition and I only noticed this because I
would get an email from the form I wasn't working on with empty fields.

This is compounded by the fact that not all of my forms have required fields -
though I assume if they did they'd show an error about missing values.


History

Comments
avatar
Date: 2017-11-18 11:01
Posted By: Robert Campbell (calguy1000)

I just spent about 1/2 an hour trying to reproduce this and can verify that on
one POST action only one form is loaded.
      
avatar
Date: 2017-11-20 07:42
Posted By: Lewis Howles (lewishowles)

To add more detail after some additional testing, I can confirm that it's still
the case that when, for example, three forms appear on the page, whichever one
is submitted, all three react.

You can see a greatly simplified version of the page in the inital screenshot:

https://www.dropbox.com/s/yk0de49bwg7l958/before.jpg?dl=0

This is the data submitted, which is correct:

-----------------------------2697334327181280772037635
Content-Disposition: form-data; name="property"

 (Reference: )
-----------------------------2697334327181280772037635
Content-Disposition: form-data; name="suggestions"

Some suggestions
-----------------------------2697334327181280772037635
Content-Disposition: form-data; name="returnid"

43
-----------------------------2697334327181280772037635
Content-Disposition: form-data; name="mfc76dform"

Vendor suggestions
-----------------------------2697334327181280772037635
Content-Disposition: form-data; name="mact"

CGBetterForms,mfc76d,default,1
-----------------------------2697334327181280772037635
Content-Disposition: form-data; name="__guid"

A205FF2E-392E-4E0E-8D4A-D6A4EA4C377E
-----------------------------2697334327181280772037635
Content-Disposition: form-data; name="__hpname"


-----------------------------2697334327181280772037635--

And when the screen reloads I get this:

https://www.dropbox.com/s/o7l1ud3mg8ksr4f/after.jpg?dl=0

What's even more interesting is in this instance, all three forms respond to
submission by showing the thank you message, but only two of them send the email
disposition - and that's because two of the forms contain a hidden field which
is filled in automatically based on the property you're looking at, in this
case.

So it looks as though all forms on a page respond to a submission, and
dispositions are only sent out for forms where one or more of the inputs are
filled in - even if that wasn't the form that was submitted.

Hope that helps.
      
avatar
Date: 2017-11-20 07:43
Posted By: Lewis Howles (lewishowles)

(three different forms in my case, of course - not sure if that makes a
difference)
      
avatar
Date: 2017-12-02 13:47
Posted By: Robert Campbell (calguy1000)

found it.
      
Updates

Updated: 2018-01-30 17:59
state: Open => Closed

Updated: 2017-12-02 13:47
resolution_id: 11 => 7

Updated: 2017-11-18 11:01
resolution_id: => 11