![]() |
romaldus 1/11/2011 |
Hello, I am testing out phprunner (by the way, the best I have tried so far) and I am stuck on how to implement a validation check. Here is what I am trying to do. On the add page, I have a list of domains that the user can select from (based on the correct ownerid useing the where function in lookup wizard). They choose a domain from the drop down and enter an IP address in the box below it. What I want to verify is that the email address they entered is part of the domain they chose. so if they chose example.com, they email address should be anything@example.com and not allow anything@example.org or etc. Any suggestions would be great. Thanks in advance. Jeff
|
![]() |
romaldus 1/11/2011 |
Hello, I am testing out phprunner (by the way, the best I have tried so far) and I am stuck on how to implement a validation check. Here is what I am trying to do. On the add page, I have a list of domains that the user can select from (based on the correct ownerid useing the where function in lookup wizard). They choose a domain from the drop down and enter an IP address in the box below it. What I want to verify is that the email address they entered is part of the domain they chose. so if they chose example.com, they email address should be anything@example.com and not allow anything@example.org or etc. Any suggestions would be great. Thanks in advance. Jeff
|
![]() |
Sergey Kornilov admin 1/11/2011 |
The first suggestion is to make user enter the left part of email address only i.e. function EmailDomain(sVal)
|
J
|
jeffrey404 author 1/12/2011 |
The first suggestion is to make user enter the left part of email address only i.e. [name input box]@[domain dropdown box] If this doesn't work for you create a Javascript validation plugin and apply it to email field. In this plugin you can read dropdown control value and verify the domain. Create file named EmailDomain.js in C:\Program Files\PHPRunner5.3\source\include\validate directory and paste the following sample code there. Modify it according to your needs. function EmailDomain(sVal)
|
![]() |
Sergey Kornilov admin 1/12/2011 |
The easiest approach is to use BeforeAdd event. Here is the sample code: $values["username"] = $values["username"] . '@' . $values["domain"]; |
J
|
jeffrey404 author 1/12/2011 |
The easiest approach is to use BeforeAdd event. Here is the sample code: $values["username"] = $values["username"] . '@' . $values["domain"];
|
![]() |
Sergey Kornilov admin 1/12/2011 |
Jeff, |
J
|
jeffrey404 author 1/13/2011 |
Jeff, I guess we need to see your project and database to answer this question. I recommend to post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program.
|
![]() |
Sergey Kornilov admin 1/13/2011 |
Yes, you do. This is a totally free service designed for testing and troubleshooting purposes. |
J
|
jeffrey404 author 1/13/2011 |
Yes, you do. This is a totally free service designed for testing and troubleshooting purposes.
|