• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Form Validation - add input field on error

#1
[eluser]Unknown[/eluser]
Hi.

I would like to ask You about an idea how to achieve following behavior:
one of the fields in the form is responsible for holding information about DNS server in a particular domain. If the DNS server is in that domain another field for IP address should be added to the form - for example if for domain example.com user enters DNS "ns1.example.com" and submits the form - the validation should return error message with additional input field for ip address of that "ns1.example.com". This additional field should also be run through validation (for valid_ip rule).

Could You give me some hints?

Thank You.

#2
[eluser]smilie[/eluser]
I would rather go for JS to determine (on blur) that DNS entry belongs to the domain;
if so, with JS 'show' the input field. Upon submit, you have both fields and can check them.

Cheers,
Smilie


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.