Skip to Content Skip to Menu

[SOLVED] Substitution in registration form

10 years 8 months ago #240879 by Ajablonski
Replied by Ajablonski on topic Substitution in registration form
Kyle, are you still available here? I know this is marked solved, but this topic has all the background information for the field in question. I can make a new one if necessary.

I used the Auto Actions plugin to place the Terms and Conditions checkbox value into a DB field. This worked great with your help. I realized though, now when I log in and edit my profile from the front end, it makes me check the checkbox for Terms and Cond again. This field is required, so it won't let me skip it. It looks like the value is stored in the DB, but it isn't pulling the value back into the checkbox from the DB when I edit my profile. I'm thinking this can be another auto action, but I'm not sure how to accomplish this. I'm also hoping there might be a better way, maybe some tag to stick in the input code like I did to make it required... Any ideas?

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48477
  • Thanks: 8281
  • Karma: 1443
10 years 8 months ago #240917 by krileon
Replied by krileon on topic Substitution in registration form
You should be able to do a conditional substitution IF statement to make sure it's checked or not. Example as follows.

[cb:if cb_terms!="1"]
<input id="cb_terms" class="required" type="checkbox" name="cb_terms" value="1" />
[/cb:if]
[cb:if cb_terms="1"]
<input id="cb_terms" class="required" type="checkbox" name="cb_terms" value="1" checked="checked" />
[/cb:if]

The above will show a non-checked checkbox if the field database column cb_terms for the user is not 1 (checked). If it is 1 (checked) it'll show a checked checkbox instead. I'm not sure exactly what column you're storing it to so please adjust cb_terms in the IF usages as needed.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

10 years 8 months ago #240948 by Ajablonski
Replied by Ajablonski on topic Substitution in registration form
That worked perfect! I didn't realize that was a possibility. Thank you!
The following user(s) said Thank You: nant

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum