close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Checkbox group settings don't stick

Thread began 2/28/2011 9:59 am by mick106153 | Last modified 4/12/2011 8:46 am by Jason Byrnes | 2472 views | 7 replies |

mick106153

Checkbox group settings don't stick

If you make an error with the security code and the form fails all the settings in the checkbox group blank out. Something the user would probably never notice and on successful resubmission their intent would not be known to the recipient.
What's the fix?

Mick

Sign in to reply to this post

Jason ByrnesWebAssist

can you send a copy of your form so I can see how it is configured.

Sign in to reply to this post

mick106153

Here it is

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

Jason ByrnesWebAssist

this is a bug with checkbox groups, i have logged it in our bugbase.


to fix the issue, add the following coed at line 1:

php:
<?php

if(!session_id()); session_start();
if (isset(
$_POST["BattleofLakeErieUSContact_submit"]))  {
    
$_SESSION['checked'] = $_POST['Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about'];
}
?>





change the code for the checkbox groups:

php:
<label class="checkSublabel_OneColumn" for="Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about__1" onblur="hideServerError('Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about__1_ServerError');">

                                 <input type="checkbox" name="Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about[]" id="Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about__1" value="Volunteer" class="formCheckboxField_Standard" <?php if (!(strcmp((isset($_GET["invalid"])?ValidatedField("contactus","Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about"):""),"Volunteer"))) {echo "checked=\"checked\"";} ?> tabindex="14" />
                                 &nbsp;Volunteer</label>
                               <label class="checkSublabel_OneColumn" for="Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about__2" onblur="hideServerError('Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about__1_ServerError');">
                                 <input type="checkbox" name="Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about[]" id="Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about__2" value="Participate" class="formCheckboxField_Standard" <?php if (!(strcmp((isset($_GET["invalid"])?ValidatedField("contactus","Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about"):""),"Participate"))) {echo "checked=\"checked\"";} ?> tabindex="15" />
                                 &nbsp;Participate</label>
                               <label class="checkSublabel_OneColumn" for="Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about__3" onblur="hideServerError('Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about__1_ServerError');">
                                 <input type="checkbox" name="Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about[]" id="Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about__3" value="Become a Sponsor" class="formCheckboxField_Standard" <?php if (!(strcmp((isset($_GET["invalid"])?ValidatedField("contactus","Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about"):""),"Become a Sponsor"))) {echo "checked=\"checked\"";} ?> tabindex="16" />
                                 &nbsp;Become a Sponsor</label>
                               <label class="checkSublabel_OneColumn" for="Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about__4" onblur="hideServerError('Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about__1_ServerError');">
                                 <input type="checkbox" name="Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about[]" id="Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about__4" value="Donate" class="formCheckboxField_Standard" <?php if (!(strcmp((isset($_GET["invalid"])?ValidatedField("contactus","Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about"):""),"Donate"))) {echo "checked=\"checked\"";} ?> tabindex="17" />
                                 &nbsp;Donate</label>
                               <label class="checkSublabel_OneColumn" for="Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about__5" onblur="hideServerError('Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about__1_ServerError');">
                                 <input type="checkbox" name="Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about[]" id="Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about__5" value="eMail Alert" class="formCheckboxField_Standard" <?php if (!(strcmp((isset($_GET["invalid"])?ValidatedField("contactus","Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about"):""),"eMail Alert"))) {echo "checked=\"checked\"";} ?> tabindex="18" />
                                 &nbsp;eMail Alerts</label>



to:

php:
<label class="checkSublabel_OneColumn" for="Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about__1" onblur="hideServerError('Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about__1_ServerError');">

                              <input type="checkbox" name="Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about[]" id="Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about__1" value="Volunteer" class="formCheckboxField_Standard" <?php if (isset($_SESSION['checked']) && is_array($_SESSION['checked']) && in_array("Volunteer",$_SESSION['checked'])) {echo "checked=\"checked\"";} ?> tabindex="14" />
                              &nbsp;Volunteer</label>
                            <label class="checkSublabel_OneColumn" for="Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about__2" onblur="hideServerError('Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about__1_ServerError');">
                              <input type="checkbox" name="Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about[]" id="Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about__2" value="Participate" class="formCheckboxField_Standard" <?php if (isset($_SESSION['checked']) && is_array($_SESSION['checked']) && in_array("Participate",$_SESSION['checked'])) {echo "checked=\"checked\"";} ?> tabindex="15" />
                              &nbsp;Participate</label>
                            <label class="checkSublabel_OneColumn" for="Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about__3" onblur="hideServerError('Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about__1_ServerError');">
                              <input type="checkbox" name="Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about[]" id="Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about__3" value="Become a Sponsor" class="formCheckboxField_Standard" <?php if (isset($_SESSION['checked']) && is_array($_SESSION['checked']) && in_array("Become a Sponsor",$_SESSION['checked'])) {echo "checked=\"checked\"";} ?> tabindex="16" />
                              &nbsp;Become a Sponsor</label>
                            <label class="checkSublabel_OneColumn" for="Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about__4" onblur="hideServerError('Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about__1_ServerError');">
                              <input type="checkbox" name="Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about[]" id="Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about__4" value="Donate" class="formCheckboxField_Standard" <?php if (isset($_SESSION['checked']) && is_array($_SESSION['checked']) && in_array("Donate",$_SESSION['checked'])) {echo "checked=\"checked\"";} ?> tabindex="17" />
                              &nbsp;Donate</label>
                            <label class="checkSublabel_OneColumn" for="Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about__5" onblur="hideServerError('Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about__1_ServerError');">
                              <input type="checkbox" name="Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about[]" id="Post_your_comments_or_questions_here_group_Check_those_you_d_like_more_information_about__5" value="eMail Alert" class="formCheckboxField_Standard" <?php if (isset($_SESSION['checked']) && is_array($_SESSION['checked']) && in_array("eMail Alert",$_SESSION['checked'])) {echo "checked=\"checked\"";} ?> tabindex="18" />
                              &nbsp;eMail Alerts</label>





and add this code after the closing </html> tag:

php:
<?php

if(isset($_SESSION['checked'])) {
unset(
$_SESSION['checked']);
}
?>
Sign in to reply to this post

mick106153

Thank you!

Works!

Mick

Sign in to reply to this post

Jason ByrnesWebAssist

you're welcome.

Sign in to reply to this post

bericson407281

I am having the same issue as above, also when any of the radio group buttons are selected they do no come through in the email.

I've attached my contact page, please let me know if you need further info...


Thanks!

Attached Files
contact.zip
Sign in to reply to this post

Jason ByrnesWebAssist

I have created a support ticket so we can look into this issue further.

To view and edit your support ticket, please log into your support history:
supporthistory.php

If anyone else is experiencing this same issue, please append to this thread.

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...