Hidden submit button until checkbox field is checked
Last Post 03-11-2011 10:42 AM by Ryan Bakerink. 5 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
Linda RhotenUser is Offline
new to the springs
new to the springs
Posts:2
Avatar

--
02-18-2010 09:25 AM

    I am using DF V3 and designing my first form.  I have the Submit button initially hidden until the user clicks the checkbox to agree to the terms of the form.  This works very well if all the required fields are populated and the email address is typed in correctly. The problem is if there are validation errors and the user has to go back and correct/populate fields.  The submit button disappears and the checkbox is still checked.  Is there a way to uncheck the checkbox if there are validation errors?  Thanks, Linda

    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    02-18-2010 09:52 AM
    HI, under module configuration, do not check "initially hide submit button". Instead, use client side javascript for this purpose. You would place the following under:
    1) module configuration / initial javascript (for page load)
    2) under Advance field option / client side event for the checkbox

    if ($(checkboxshortname))
    {
    showhtml('SaveForm')
    }
    else
    {
    hidehtml('SaveForm')
    }

    Check out this form tutorial:
    http://www.datasprings.com/Products...fault.aspx
    -- David
    ChuckUser is Offline
    river guide
    river guide
    Posts:157
    Avatar

    --
    03-17-2010 05:58 AM
    Posted By David To on 02/18/2010 11:52 AM
    HI, under module configuration, do not check "initially hide submit button". Instead, use client side javascript for this purpose. You would place the following under:
    1) module configuration / initial javascript (for page load)
    2) under Advance field option / client side event for the checkbox

    if ($(checkboxshortname))
    {
    showhtml('SaveForm')
    }
    else
    {
    hidehtml('SaveForm')
    }

    Check out this form tutorial:
    http://www.datasprings.com/Products...fault.aspx
    -- David


    Hi David,
    I have used this option before but what I would really like to happen is that the hidehtml('SaveForm') to disappear and the checkbox for the "Agree To Terms" to be set back to the "Uncheck" state.  I have another client side javascript that is tied to the checkbox besides the script you provide, so it would be nice to force the user to "check" the box again.

    Thanks.

    Chuck

    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    03-17-2010 07:26 AM
    Hi, I still don't quite get the picture. If you click on the checkbox, it should show the "Save". If you uncheck the checkbox, it should hide the "Save". What other options / javascript on the form do you have that triggers the hiding of the "Save" while leaving the checkbox still in check mode? -- David
    BWinnUser is Offline
    skipping stones
    skipping stones
    Posts:6
    Avatar

    --
    03-11-2011 10:22 AM
    Thanks Chuck, your response fixed the problem I had which was the same as the OP
    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    03-11-2011 10:42 AM
    Hello BWinn,

    If you ever have any questions please let us know.

    Thanks,

    Ryan


    ---
  • film izle
  • 720 izle
  • film
  • sinema izle
  • film makinesi
  • T�rk�e dublaj film
  • film izle
  • film izle
  • baglan film izle
  • sinema izle
  • 1080 film izle
  • film mercegi