close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Form Validation Failing to re-populate user form data

Thread began 3/04/2012 10:10 am by Paul | Last modified 4/02/2012 2:13 pm by Paul | 1092 views | 13 replies

PaulBeta Tester

Form Validation Failing to re-populate user form data

SA 2.0.4 in DW CS5.5

Error when the users email entry fails form validation (ie dupe entry), the registration page refreshes with original user data, but the radio group fails to populate with earlier user selection, returning instead the following errors against each radio; (I have replaced the original checked values set by the SA Wizard from "this" and "that" to 1)

array_search() expects parameter 2 to be array, string given in C:\xampp\htdocs\..\..\regme.php on line 167
checked="1" tabindex="5">

array_search() expects parameter 2 to be array, string given in C:\xampp\htdocs\..\..\regme.php on line 170
checked="1" tabindex="6">


The respective lines are as follows;

php:
<div class="lineGroup">
          <label for="Registration_group_Membership_Type__1" class="sublabel" > Membership:<span class="requiredIndicator">&nbsp;*</span></label>
          <div class="errorGroup"> <span id="Registration_group_Membership_Type__1_Spry"> <span class="radioFieldGroup_Narrow"> <span class="radioGroup_Narrow">
          <label class="radioSublabel_Narrow" for="Registration_group_Membership_Type__1" onBlur="hideServerError('Registration_group_Membership_Type__1_ServerError');"> I am selling&nbsp;
            <input type="radio" name="Registration_group_Membership_Type" id="Registration_group_Membership_Type__1" value="1" class="formRadioField_Standard" <?php if (array_search("1", ((isset($_GET["invalid"]) && ValidatedField("regme","Registration_group_Membership_Type"))?ValidatedField("regme","Registration_group_Membership_Type"):array())) !== false) {echo "checked=\"1\"";} ?> tabindex="5">
          </label>
          <label class="radioSublabel_Narrow" for="Registration_group_Membership_Type__2" onBlur="hideServerError('Registration_group_Membership_Type__1_ServerError');">I am buying&nbsp;
            <input type="radio" name="Registration_group_Membership_Type" id="Registration_group_Membership_Type__2" value="2" class="formRadioField_Standard" <?php if (array_search("2", ((isset($_GET["invalid"]) && ValidatedField("regme","Registration_group_Membership_Type"))?ValidatedField("regme","Registration_group_Membership_Type"):array())) !== false) {echo "checked=\"1\"";} ?> tabindex="6">
          </label>
          </span></span> </span> </div>
        </div>



The original option button values applied by SA "this" and "that" have been replaced by 1 and 2, which are the values I want sent to MySQL according to user selection.

Any ideas?

Thanks.

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