How to set additional hidden fields requesting IP address, OS etc.?
- Clemens
-
Topic Author
- Offline
- Junior Member
-
2 years 8 months ago #1
by Clemens
How to set additional hidden fields requesting IP address, OS etc.? was created by Clemens
I have not understood the documentation of NS Pro about using the additional fields when they have the status "hidden". On sub scribing, it would be nice to have the email address checked, wether it is typed in correctly. Further I would like to registrate the ip address, the webbrowser an the operating system of the subscriber – at least, when he would confirm the subscription.
There are hints for initial values and for validation RegEx and further the option, wether the field is "required" to fill with information.
Example: When I set initial value to #subscriber_ip# and then set validation RegEx to #ip_address' and further that this field is "required", I have not seen any new subscription, containing the ip address, when looking in the list of subscribers.
Would you please explain it to me?
I would appreciate, if the documentation would be more detailed about these additional fields. Further there could be an explanation about your very helpful hint, to modify content dependent from the content of an additional field by using "if"-conditions. These features are not common for Joomla newsletter extensions and I like it very much, that NS Pro does contain these without requesting an additional price for that.
There are hints for initial values and for validation RegEx and further the option, wether the field is "required" to fill with information.
Example: When I set initial value to #subscriber_ip# and then set validation RegEx to #ip_address' and further that this field is "required", I have not seen any new subscription, containing the ip address, when looking in the list of subscribers.
Would you please explain it to me?
I would appreciate, if the documentation would be more detailed about these additional fields. Further there could be an explanation about your very helpful hint, to modify content dependent from the content of an additional field by using "if"-conditions. These features are not common for Joomla newsletter extensions and I like it very much, that NS Pro does contain these without requesting an additional price for that.
Please Log in or Create an account to join the conversation.
- Christopher Mavros
-
- Offline
- Administrator
-
2 years 8 months ago #2
by Christopher Mavros
Christopher Mavros
me@mavxr.com
If you like our extensions, please rate us on the JED!
Replied by Christopher Mavros on topic How to set additional hidden fields requesting IP address, OS etc.?
Hi again Clemens and thank you for posting.
Please keep in mind that my work is focused on learn-as-you-go methods with massive use of inline help tips.
So, make sure to enable inline help whenever you edit something in NS Pro or any of our extensions. You should be able to find whatever you need in this help tips.
If something is not obvious, we usually include a help text in the edit form, as in this case.
NS Pro fields can be "hidden", in the same sense that HTML inputs are of type "hidden". These are non-visible fields that contain form information.
As with all fields, these fields may have an "initial value". That is the value they have when they are rendered from NS Pro. Hidden fields are not visible, so the initial value is the value posted to the form.
You may write whatever you want in a hidden field. For example, you could write a number or a code to indicate which NS Pro form is this, and include the appropriate hidden fields in each form. (module or menu item options)
Currently, there are 5 special values that you can write in a NS Pro field (usually hidden)
As with the initial value, you can write anything you want in the validation regular expression field.
This would have to be a valid PCRE regular expression, including the containing slashes and possible modifiers.
For the sake of sanity and convenience, we have pre-included some regular expressions, and wrote some special texts for them to trigger.
Those are currently:
There are many possible reasons that a visitor's IP may not be pre-written from NS Pro, so having a hidden field that is validated and required may cause the form to be impossible to post.
As for the {if-}{/if} tags, feel free to elaborate on your question, and I will happily explain more on the topic!
Thanks again!
Please keep in mind that my work is focused on learn-as-you-go methods with massive use of inline help tips.
So, make sure to enable inline help whenever you edit something in NS Pro or any of our extensions. You should be able to find whatever you need in this help tips.
If something is not obvious, we usually include a help text in the edit form, as in this case.
NS Pro fields can be "hidden", in the same sense that HTML inputs are of type "hidden". These are non-visible fields that contain form information.
As with all fields, these fields may have an "initial value". That is the value they have when they are rendered from NS Pro. Hidden fields are not visible, so the initial value is the value posted to the form.
You may write whatever you want in a hidden field. For example, you could write a number or a code to indicate which NS Pro form is this, and include the appropriate hidden fields in each form. (module or menu item options)
Currently, there are 5 special values that you can write in a NS Pro field (usually hidden)
- #subscriber_ip# to get the visitor IP Address
- #page_url# to get the page in which the visitor subscribed
- #referer# to get the referring page
- #web_browser# to get the visitor Web Browser
- #operating_system# to get the visitor OS
As with the initial value, you can write anything you want in the validation regular expression field.
This would have to be a valid PCRE regular expression, including the containing slashes and possible modifiers.
For the sake of sanity and convenience, we have pre-included some regular expressions, and wrote some special texts for them to trigger.
Those are currently:
- #email# Validates an email.
- #us_state_code# Validates a USA State Code
- #us_zip_code# Validates a USA Zip Code
- #canada_postal_code# Validates a Canada Postal Code
- #uk_postal_code# Validates a UK Postal Code
- #north_america_phone# Validates a Phone Number from North America
- #ip_address# Validates an IP Address
There are many possible reasons that a visitor's IP may not be pre-written from NS Pro, so having a hidden field that is validated and required may cause the form to be impossible to post.
As for the {if-}{/if} tags, feel free to elaborate on your question, and I will happily explain more on the topic!
Thanks again!
Christopher Mavros
me@mavxr.com
If you like our extensions, please rate us on the JED!
Please Log in or Create an account to join the conversation.
Moderators: Christopher Mavros