Dennis Rusch Posted December 18, 2020 Share Posted December 18, 2020 How can I fill the 'name' property (of the editfield on the webpage) of an TUniEdit field so the autofill knows what content to put in it. When using the FieldLabel property of the TUniEdit the 'name' property is filled with that value. But as I cannot use the FieldLabel property for this puprose I would like to fill the 'name' property myself. But I cannot seem to find a way. When I use the 'Telephone' as a value for the FieldLabel, the name of the edit control on the form will be 'Telephone:' and the webbrowser will fill in the telephone number if present. How can this be done? Regards, Dennis 1 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 18, 2020 Share Posted December 18, 2020 Hello, First of all, please specify the build and edition of UniGUI you are using. Thanks. Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted December 18, 2020 Share Posted December 18, 2020 22 minutes ago, Dennis Rusch said: I would like to fill the 'name' property myself. Hello, The best way here is to use UniDBEdit. if you want to use UniEdit : UniEdit1.Text:= MyDataSet.Fields.FieldByName('Telephone').AsString; Quote Link to comment Share on other sites More sharing options...
Dennis Rusch Posted December 18, 2020 Author Share Posted December 18, 2020 Thank you for your reply. I am using version 1.90.0.1541 and the desktop edition. I am not trying to fill the edit field, but I am trying to alter the 'name' property of the field on the webform (in the browser). That name property is what the browser uses to auto fill the corrrect value into the editfield. Normally the 'name' property is empty, but when I use the FieldLabel property of the TUniEdit the 'name' property in the browser will contain the value of the FieldLabel property as set in the TUniEdit. I would like to fill the 'name' property without using a FieldLabel. Is this possible? Regards, Dennis Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 18, 2020 Share Posted December 18, 2020 4 minutes ago, Dennis Rusch said: I am using version 1.90.0.1541 and the desktop edition. If you are not using the trial version: Quote Link to comment Share on other sites More sharing options...
Dennis Rusch Posted December 18, 2020 Author Share Posted December 18, 2020 I have changed the Forum E-mail. 1 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 18, 2020 Share Posted December 18, 2020 2 hours ago, Dennis Rusch said: How can I fill the 'name' property (of the editfield on the webpage) of an TUniEdit field so the autofill knows what content to put in it. When using the FieldLabel property of the TUniEdit the 'name' property is filled with that value. But as I cannot use the FieldLabel property for this puprose I would like to fill the 'name' property myself. But I cannot seem to find a way. When I use the 'Telephone' as a value for the FieldLabel, the name of the edit control on the form will be 'Telephone:' and the webbrowser will fill in the telephone number if present. Please explain in more detail. Quote Link to comment Share on other sites More sharing options...
Dennis Rusch Posted December 18, 2020 Author Share Posted December 18, 2020 An Edit field on a form on a website has a 'name' property. This name property is used by the browser to determine what kind of information it contains. And therefore it knows what information from an address should go in which edit field (using auto fill). When I specify a TUniEdit.FieldLabel (e.g. telephone) with the TUniEdit UNIGUI copies this value in the 'name' property of the edit field on the webform. And now the browser knows that it should fill in the telephone number at that field when the user chooses to auto-fill the form with his contact information. I would like to fill this 'name' property without using the TUniEdit.FieldLabel. I've added two screenshots with the resulting form-editfield. One without the TUNIEdit.FieldLabel filled and one with the TUniEdit.FieldLabel filled with 'Telephone'. Quote Link to comment Share on other sites More sharing options...
x11 Posted December 19, 2020 Share Posted December 19, 2020 // for mobile TunimEdit - painted function painted(sender, eOpts) { var me = sender.inputElement; //console.log(sender); me.dom.setAttribute('autocomplete', 'tel'); me.dom.setAttribute('name', 'tel-local'); } // for desktop TuniEdit - afterrender function afterrender(sender, eOpts) { var me = sender.inputEl; me.el.dom.setAttribute('autocomplete', 'tel'); me.el.dom.setAttribute('name', 'tel-local'); } https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete http://forums.unigui.com/index.php?/topic/9634-autofill-how-to-turn-off/&do=findComment&comment=86104 http://forums.unigui.com/index.php?/topic/15681-автозаполнение-запоминание-ранее-введенных-значений/&do=findComment&comment=86046 Quote Link to comment Share on other sites More sharing options...
55143681 Posted January 6, 2021 Share Posted January 6, 2021 On 12/18/2020 at 4:56 PM, Sherzod said: Hello, First of all, please specify the build and edition of UniGUI you are using. Thanks. Some advice: In your forum,If anyone create a task, give some UniEdit to write the version etc. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 6, 2021 Share Posted January 6, 2021 1 hour ago, 55143681 said: Some advice: In your forum,If anyone create a task, give some UniEdit to write the version etc. We'll check it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.