Dependent text input

hi all… i want text input dependent for textfield. i don’t want droptown dependent… if possible please reply me…

Fields

Mobile No:

Name:

Email:

Entered mobile no is already register -->>> i want value change in Name and email.Else Nothing…

Is not very clear what you want to achieve.

You want the mobile text filed read only and became editable only after the user change email and/or name filed (which a javascript solution)?

Or you want a validation rule which give an error if the user change the mobile but email and name are unchanged (which is a yii2 solution)?

Hi Duan, welcome to the forum.

If I understand you right, you want to do the following, don’t you?

  1. There are 3 input fields in the form - mobile no, name and e-mail address - they are all text input fields.

  2. When the user input mobile no, then the page will ask the server whether the number is already registered.

3A ) When the number is already registered, then the text input fields of name and e-mail address will be automatically filled with the registered user’s data.

3B ) When not, nothing will happen and the fields for name and e-mail address will remain empty to accept the user input.

Right?

I think it will be possible by making use of some ajax call.

But I’m a bit afraid that it would be a security hole of your app, because anyone would be possible to gather the personal information stored in your app just by entering the mobile numbers using this form.

What do you want to do with this form?