Support

  1. vitalyb
  2. Support
  3. Tuesday, June 07 2016, 07:43 AM
Hi There.
I have a question.
I am building complex registration form customers, following registration i need the customer to enter some serial number.
The number are
xxx-xx-xxx.


I need to validate text field that must to include 3 special digits on the beginning
900-xx-xxx or 700-xx-xxx.

all other option are as error.
Also i would like to add this field to the email message that administrator get to approve new user following registration process.
Please help me
Vitaly.
Attachments (1)
Accepted Answer
admin Accepted Answer
Admin
Hi,
sorry for late reply, we are investigating about this.

Try to replace these files with attached files (unzip first)
- /administrator/components/com_jsn/helpers/fields/text.php
- /components/com_jsn/assets/js/name.js

After this restart your browser.

if this works we will include in next release :D
Attachments (1)
  1. more than a month ago
  2. Support
  3. # Permalink
admin Accepted Answer
Admin
It works only with absolute URL
Great, but this is strange, in our example it works with this HTML code (relative path):

<p><img src="/images/19377231_l.jpg" alt="" width="300" /></p>


Maybe you are some wrong configuration in TinyMCE (Plugins->Editor - TinyMCE) or maybe you are in localhost and this create some problem.
  1. more than a month ago
  2. Support
  3. # 1
vitalyb Accepted Answer
Pro
Content Protected
  1. more than a month ago
  2. Support
  3. # 2
admin Accepted Answer
Admin
In our screenshot we have added image from media folder (like normal article) and works. Try to check your image URL (or try with absolute URL)
  1. more than a month ago
  2. Support
  3. # 3
vitalyb Accepted Answer
Pro
Unfortunately this is local test web site that not published yet :-(
  1. more than a month ago
  2. Support
  3. # 4
admin Accepted Answer
Admin
can you please post me your site link to check this?
  1. more than a month ago
  2. Support
  3. # 5
vitalyb Accepted Answer
Pro
Yes, see attached images
  1. more than a month ago
  2. Support
  3. # 6
admin Accepted Answer
Admin
Sorry can you explain me where you add this image?
  1. more than a month ago
  2. Support
  3. # 7
vitalyb Accepted Answer
Pro
Content Protected
  1. more than a month ago
  2. Support
  3. # 8
admin Accepted Answer
Admin
Another small issue, is there any way to add image to the tooltip of textbox ?

Hi you can manage this with 2 ways:
Tooltip (screenshot1)
add your description in HTML editor, the code will be shown as tooltip

Field Position (screenshot2)
You can add HTML code a field position with HTML delimiter field type, here docs http://docs.easy-profile.com/index.php/article/html-delimiter-field-type
Attachments (2)
  1. more than a month ago
  2. Support
  3. # 9
vitalyb Accepted Answer
Pro
Thank you.
Another small issue, is there any way to add image to the tooltip of textbox ?
  1. more than a month ago
  2. Support
  3. # 10
vitalyb Accepted Answer
Pro
Sure, here attacched
  1. more than a month ago
  2. Support
  3. # 11
admin Accepted Answer
Admin
Can you please post me screenshot of your text field configuration?
  1. more than a month ago
  2. Support
  3. # 12
vitalyb Accepted Answer
Pro
Thank you for your reply
From some reason regex not working for me.
See attached images.
I seted it it textbox by custome - regex

[79]00-[0-9]{2}-[0-9]{3}

Trying to wrte incorrect number - nothing happen, while registration, no error appear.
  1. more than a month ago
  2. Support
  3. # 13
admin Accepted Answer
Admin
How this custom regex work?
Regex is a standard, it not regards Easy Profile. here some doc https://en.wikipedia.org/wiki/Regular_expression
Is it real time validation or on user iteration?
You will have a client (HTML5) and server validation
Can you help me with regex? i need the first 3 digits to be only 900 or 700 .
No Problem, you can try with this:

[79]00-[0-9]{2}-[0-9]{3}
  1. more than a month ago
  2. Support
  3. # 14
vitalyb Accepted Answer
Pro
How this custom regex work?
Is it real time validation or on user iteration?
Can you help me with regex? i need the first 3 digits to be only 900 or 700 .
  1. more than a month ago
  2. Support
  3. # 15
admin Accepted Answer
Admin
Hi,
Validation
You can set a format allowed in Text Field Option, set following parameters:
Format: Custom
Custom Format: [0-9]{3}-[0-9]{2}-[0-9]{3}

Custom format works with regex sintax

Email with Code
Easy Profile don't do this, But you can do something like this:

admin approval
- Enable Admin approve by setting parameter "New User Account Activation" to "admin", you will find this parameter at Administration->Users->Manage->Options (button)
- Now when user register on your site then he need admin approval

email with code
you can't send the code in admin approval email, but you can send a second email with user data. To do this you need to write simple plugin by using our APIs (docs with example plugin at http://docs.easy-profile.com/index.php/article/triggers)
- Download, Install and Enable Skeleton Plugin (you will find it at http://docs.easy-profile.com/index.php/article/triggers)
- Open file /plugins/jsn/skeleton/skeleton.php
- remove samples functions: triggerFieldAvatarUpdate, triggerProfileUpdate
- add function like this:


public function triggerProfileUpdate($user, &$data, $changed, $isNew)
{
if($isNew)
{
// Start body of email
$body=$user->name." registered on your site. \n\n";

// Add fields to body email
foreach($changed as $fieldalias){
$body.=$fieldalias .": ". $data[$fieldalias] ."\n";
}

// Send Email
$result=JFactory::getMailer()->sendMail(
$user->email, // Sender Mail
$user->name, // Sender Name
'[email protected]', // Receiver Mail
'User Registered', // Subject Mail
$body // Body Mail
);
}
}


this example function send a email with all user data.

NOTE: This code is not tested and not supported, this is only for example purpose.
Attachments (1)
  1. more than a month ago
  2. Support
  3. # 16
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Request Support

Support is currently Offline

Support Availability

Working days: Monday to Friday. The support staff is not available on weekends; in the most of cases tickets will not be answered during that time.

Reply time: Depending on the complexity of your support issue it's usually between a few minutes and 24 hours for paid members and about one week for free members. When we expect longer delays we will notify you.

Guidelines

Before you post: read the documentation and search the forums for an answer to your question.

When you post: include Site Details if you request a support (you can use the form below the reply in Site Details tab).

Auto Solved Question: If after a week the author of the post does not reply to a request by moderator, the question will be marked as resolved.

Language: only English

Search Users

Easy Profile® is not affiliated with or endorsed by Open Source Matters or the Joomla Project. Joomla is Free Software released under the GNU/GPL License.