Add script to autofill streetname and city to cb registration form

2 months 4 days ago - 2 months 4 days ago #337297 by TheoSp
Hello,

I have nice looking  cb registration form with fields postalcode, housenumber, streetname and cityname.
Now I have a js (ajax) script to autofill streetname and cityname by filled in postalcode and housenumber.
How can I add the script to the form? Is there a html or php file I can modify?

Thanks, Theo

Please Log in to join the conversation.

2 months 4 days ago #337302 by krileon
Easiest way is to use CB Auto Actions. You can then inject your script into the registration form using registration form display triggers.

We do not provide core file modification support in any way and your changes will be lost when you update CB.


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 to join the conversation.

2 months 4 days ago #337305 by TheoSp
Thanks for answering.
What I also need is code added to the field like:
Postcode <input type=text id=postcode onkeyup='check_pc("postcode",this.value)' autofocus>
How can I do that?

Thanks, Theo

Please Log in to join the conversation.

2 months 4 days ago #337306 by krileon
As a field? Use Custom HTML field. Note your JS might be filtered out by Joomla's WYSIWYG though.


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 to join the conversation.

2 months 4 days ago #337307 by TheoSp
I already tried that. But we have field title and field name and a editor to put html code.
But how do I combine the code with de field name?
Normally in html de fieldname is within the code like:
<tr><td>Postcode</td> <td><input type=text id=postcode onkeyup='check_pc("postcode",this.value)' autofocus></td></tr>

Theo

Please Log in to join the conversation.

2 months 4 days ago #337310 by krileon
You just set the field name in the Custom HTML fields title parameter or set it to display on 2 lines without a title then format the HTML however you want.


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 to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.195 seconds

Facebook Twitter LinkedIn