Jump to content

[SOLVED] Need Checkbox to stay checked after submitting


tyooseph

Recommended Posts

Hello,

 

I have a form with several fields that are required if the user checks a checkbox.  I am validating the form and displaying errors on the screen for the user to correct; however, the checkbox does not remain checked if errors are displayed.  I've tried searching the Internet for solutions and found the following, which does not work.  Am I missing something?  Please advise.  Thank you.

 

<input type="checkbox" name="showSummary"<?php

    if($showSummary == 'on'){echo " CHECKED";}?>> Summary

  • 4 years later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.