Need hidden field at registration

11 years 6 months ago - 11 years 6 months ago #214328 by activha
Need hidden field at registration was created by activha
We need to get a result of a PAP cookie in a hidden field at CB registration page in order to get a proper parent for our new users
We need to have
<input type="hidden" name="papcustom" id="affCookieInfoId" value="">

Following use of this js code
<script id="pap_x2s6df8d" src="/affiliation/scripts/salejs.php" type="text/javascript">
</script>
<script type="text/javascript">
PostAffTracker.writeAffiliateToCustomField('affCookieInfoId');
</script>

Can I use a CB field to do this and how ?
I need to send the result to PAP registration php page in order to set the proper relation affiliate/parent

Please Log in to join the conversation.

11 years 6 months ago - 11 years 6 months ago #214345 by krileon
Replied by krileon on topic Re: Need hidden field at registration
Add your hidden field with a delimiter field then use CB Auto Actions to add your JS to the registration page by using the before registration display trigger. If you want the field stored with the user though you'll need to use a normal text field for example then hide it with CSS.


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.

11 years 6 months ago #214485 by activha
Replied by activha on topic Re: Need hidden field at registration
CB auto actions fails with this kind of js code

if I select inline js, this will insert it in full and throw js errors by repeating the script tags, and if I try to insert the url first I cannot add the id tag in the script !

Is there any other way to do it ?

Please Log in to join the conversation.

11 years 6 months ago #214500 by krileon
Replied by krileon on topic Re: Need hidden field at registration
You'll need two auto actions for the same trigger. 1 as JS (URL) to add your script then another as JS (Inline) to add the inline JS. Example as follows.

JS (URL)
URL: /affiliation/scripts/salejs.php

Note the above URL probably needs to include live site domain.

JS (Inline)
Code: PostAffTracker.writeAffiliateToCustomField('affCookieInfoId');


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.

11 years 6 months ago #214502 by activha
Replied by activha on topic Re: Need hidden field at registration

krileon wrote: JS (URL)
URL: /affiliation/scripts/salejs.php


What I meant was that for this URL there is no way to add the ID tag which is needed.

Do you have any suggestions on this ?

Please Log in to join the conversation.

11 years 6 months ago #214506 by krileon
Replied by krileon on topic Re: Need hidden field at registration
I see, in that case set Method to Header and supply it your code block above in your original post. This adds custom header HTML.


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

Facebook Twitter LinkedIn