Post development, required fields
After a registration form was completed in Security Assist, the client now wants to have more fields required. Post creation, what are the steps to add required to more fields?
Thanks much.
After a registration form was completed in Security Assist, the client now wants to have more fields required. Post creation, what are the steps to add required to more fields?
Thanks much.
In the fc_registration_default.xml I found, for the password field this:
<wa_field_set_validation>Password values must match.</wa_field_set_validation>
<wa_field_reference src="text_medium.xml" label="Confirm" validation="{ required: true, isConfirm: true, regEx: null, minAlphaChars: null, maxAlphaChars: null, minNumbers: null, maxNumbers: null, minUpperAlphaChars: null, maxUpperAlphaChars: null, minSpecialChars: null, maxSpecialChars: null, minChars: null, maxChars: null }" serverValidation="required" spryValidation="undefined, { isConfirm:true }" continueLine="false"></wa_field_reference>
Comparing that to a field that is not required,
<wa_field_set_validation>Please enter a value.</wa_field_set_validation>
<wa_field_reference src="text_medium.xml" label="company" validation="{ required: false, type: 'none', format: null, minChars: null, maxChars: null, minValue: null, maxValue: null }" spryValidation="none, { isRequired:false }" continueLine="false"></wa_field_reference>
there is the difference of
required: true, isConfirm: true
vs
required: false
and
{ isConfirm:true }
vs
{ isRequired:false }
So, if I were to change the second set to
<wa_field_set_validation>Please enter a value.</wa_field_set_validation>
<wa_field_reference src="text_medium.xml" label="company" validation="{ required: true, type: 'none', format: null, minChars: null, maxChars: null, minValue: null, maxValue: null }" spryValidation="none, { isRequired:true }" continueLine="false"></wa_field_reference>
would that be what I should be doing? I don't want to break anything. Is there any other place I should change something, if I am on the right track?
Thanks much
On the registration page, open the server behaviors panel and double click the Server Validation server behavior.
select the Required validation type. Click the lightning bolt next to Server Variable and select the aditional field that should be required, then click the plus button to add it to the list of validations.
repeat this for each additional form element that should be required.
you will then need to create the validation error massages, type the error test next to the form element, highlight the error text then go to WebAssist -> Forms -> Validation -> Validation Show If.
Select the validation to trigger the error message, then click the plus button and click ok.
Use the same steps to create the validation error messages for the other elements.
Thanks so much Jason. I'll give it a try.
Perfect! Thank you so much, as always.
Well, my test worked for one field. But then other fields didn't so I'm starting fresh.
I stupidly upgraded today to the newest SA in the middle of this, so I may have caused myself a problem.
Starting over. One issue was solved on the phone, so I can't find notes on it in the forum. It was how to get the redirect after logged in to go to the update page. A form redirect somewhere. Sorry for all the hassle.
never mind... i think I found it...
$WA_Auth_Separator."".((isset($_POST["Log_In_group_password"]))?$_POST["Log_In_group_password"]:"") .""),
"columnTypes" => explode($WA_Auth_Separator,"text".$WA_Auth_Separator."text"),
"sessionColumns" => explode($WA_Auth_Separator,"ID"),
"sessionNames" => explode($WA_Auth_Separator,"SecurityAssist_ID"),
"successRedirect" => "userupdate.php",
"failRedirect" => "forgotpassword.php",
"gotoPreviousURL" => TRUE,
"keepQueryString" => TRUE
);
But, curious why this wouldn't be built into the system...
sorry for noise....
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
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.