close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Spry Panel Validation

Thread began 10/20/2011 8:27 am by dcb286193 | Last modified 10/21/2011 7:39 am by Jason Byrnes | 1516 views | 3 replies |

dcb286193

Spry Panel Validation

I am trying to create a form in-which the user checks a check box a spry panel expands and they continue filling in the form. I can do this but once the form is submitted, since I have the spry panel set as close by default, the panel is closed on page reload even though their are validation issues. What I would like to have happen is if their are any validation issues on the panel the panel remains open on submit.

I have gone through the posts and have picked up on some tips with validation so when the check box is checked it validates only the parts of the form associated with that check box. But keeping the panel open upon submit I have not run across.

Your help would be appreciated.

Sign in to reply to this post

Jason ByrnesWebAssist

The spry panel code will have a variable to set the onload status of the panel, you would need to create an if statement to check the value of the checkbox to set it to open based on the checkbox value.

see the following page for more details on the tabbed panel:
index.html

Sign in to reply to this post

dcb286193

I understand now how to programatically open and close the panel, thank you.

I am still having an issue with the form though. The check box does not hold the post value if their is an error. Also the boxes start out checked and I can not get them to start unchecked. I did not modify anything on the form and is built straight from CSS form builder. So, I do not understand what I am doing wrong. I have attached the file for you to look at

Attached Files
quote.php.zip
Sign in to reply to this post

Jason ByrnesWebAssist

Make the following changes:

line 570:

php:
<input type="checkbox" name="formQuoteRequest_Printing" id="formQuoteRequest_Printing" value="1" class="formCheckboxField_Standard" <?php if (!(strcmp((isset($_GET["invalid"])?ValidatedField("quote","formQuoteRequest_Printing"):""),""))) {echo "checked=\"checked\"";} ?> tabindex="12" />



to:

php:
<input type="checkbox" name="formQuoteRequest_Printing" id="formQuoteRequest_Printing" value="1" class="formCheckboxField_Standard" <?php if (!(strcmp((isset($_GET["invalid"])?ValidatedField("quote","formQuoteRequest_Printing"):""),"1"))) {echo "checked=\"checked\"";} ?> tabindex="12" />



Line 588:

php:
<input type="checkbox" name="formQuoteRequest_Posters" id="formQuoteRequest_Posters" value="1" class="formCheckboxField_Standard" <?php if (!(strcmp((isset($_GET["invalid"])?ValidatedField("quote","formQuoteRequest_Posters"):""),""))) {echo "checked=\"checked\"";} ?> tabindex="13" />



to:

php:
<input type="checkbox" name="formQuoteRequest_Posters" id="formQuoteRequest_Posters" value="1" class="formCheckboxField_Standard" <?php if (!(strcmp((isset($_GET["invalid"])?ValidatedField("quote","formQuoteRequest_Posters"):""),"1"))) {echo "checked=\"checked\"";} ?> tabindex="13" />





Line 606:

php:
<input type="checkbox" name="formQuoteRequest_Mailing" id="formQuoteRequest_Mailing" value="1" class="formCheckboxField_Standard" <?php if (!(strcmp((isset($_GET["invalid"])?ValidatedField("quote","formQuoteRequest_Mailing"):""),""))) {echo "checked=\"checked\"";} ?> tabindex="14" />



to:

php:
<input type="checkbox" name="formQuoteRequest_Mailing" id="formQuoteRequest_Mailing" value="1" class="formCheckboxField_Standard" <?php if (!(strcmp((isset($_GET["invalid"])?ValidatedField("quote","formQuoteRequest_Mailing"):""),"1"))) {echo "checked=\"checked\"";} ?> tabindex="14" />



Line 624:

php:
<input type="checkbox" name="formQuoteRequest_Graphics" id="formQuoteRequest_Graphics" value="1" class="formCheckboxField_Standard" <?php if (!(strcmp((isset($_GET["invalid"])?ValidatedField("quote","formQuoteRequest_Graphics"):""),""))) {echo "checked=\"checked\"";} ?> tabindex="15" />



to:

php:
<input type="checkbox" name="formQuoteRequest_Graphics" id="formQuoteRequest_Graphics" value="1" class="formCheckboxField_Standard" <?php if (!(strcmp((isset($_GET["invalid"])?ValidatedField("quote","formQuoteRequest_Graphics"):""),"1"))) {echo "checked=\"checked\"";} ?> tabindex="15" />



Line 642:

php:
<input type="checkbox" name="formQuoteRequest_WebDesign" id="formQuoteRequest_WebDesign" value="1" class="formCheckboxField_Standard" <?php if (!(strcmp((isset($_GET["invalid"])?ValidatedField("quote","formQuoteRequest_WebDesign"):""),""))) {echo "checked=\"checked\"";} ?> tabindex="16" />



to:

php:
<input type="checkbox" name="formQuoteRequest_WebDesign" id="formQuoteRequest_WebDesign" value="1" class="formCheckboxField_Standard" <?php if (!(strcmp((isset($_GET["invalid"])?ValidatedField("quote","formQuoteRequest_WebDesign"):""),"1"))) {echo "checked=\"checked\"";} ?> tabindex="16" />
Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...