EasyUI Forum
April 28, 2024, 11:50:39 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: TextBox and PasswordBox inputID not getting set  (Read 5375 times)
chrwei
Full Member
***
Posts: 219


View Profile Email
« on: August 06, 2019, 02:12:37 PM »

might be specifically when inside a FormField

Code:
				<FormField name="username" label="Username:"}>
<TextBox iconCls="icon-man" inputId="username" />
</FormField>
<FormField name="password" label="Password:"}>
<PasswordBox iconCls="icon-lock" inputId="password" />
</FormField>

the resulting HTML has a generated ID, not the specified one. 

my goal is to try to get the form to play nice with LastPass specifically, and other password managers if possible.  this is one of the methods the password managers use to find what field to hook into.
Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 on: August 07, 2019, 07:05:59 PM »

You can custom the form field and assign the special 'inputId' value. Please try this code.
Code:
<FormField name="name">
<div style={{display:'flex',alignItems:'center'}}>
  <Label labelAlign="right" htmlFor="username" style={{width:120,textAlign:'right'}}>Name:</Label>
  <TextBox className="f-full" iconCls="icon-man" inputId="username"></TextBox>
</div>
</FormField>
Logged
chrwei
Full Member
***
Posts: 219


View Profile Email
« Reply #2 on: August 12, 2019, 12:09:01 PM »

that generated the html I expect, but lastpass still doesn't find the fields  Sad
Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #3 on: August 12, 2019, 07:05:07 PM »

Use this code instead.
Code:
<FormField>
<div style={{ display: 'flex', alignItems: 'center' }}>
  <Label labelAlign="right" htmlFor="username" style={{ width: 120, textAlign: 'right' }}>Name:</Label>
  <TextBox className="f-full" iconCls="icon-man" name="name" inputId="username"></TextBox>
</div>
</FormField>
Logged
chrwei
Full Member
***
Posts: 219


View Profile Email
« Reply #4 on: October 14, 2019, 09:03:51 AM »

this still isn't working.  a related issue, when I assign inputId to a TextBox that's inside a FormField, the inputId I assign is not used, an autogenerated like "form-field-inputid-7" is used instead.  this may at least be part of the problem
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!