I am developing a form for users to change their password. The password is not visible because the field input type is “password”.

Now I want to add an icon to the fields so users can toggle in showing/hiding the password.

All examples I have found are using javascript to change the type of the input field to "text". Looks very easy. They reference the input field by its ID or NAME.

With Formspider Mobile the ID and NAME can not be set. Instead the field gets a random ID and fs-name attribute.

Can you give me a hint what to do?

asked 19 Jul, 02:15

Jan%20Willem%20Vermeer's gravatar image

Jan Willem V...
14311657
accept rate: 0%


Hi,

i have solved this as follows:

1) Create a datasource for the password field.

2) Create panel passWordHidden to show the field as a passwordfield.

3) Create panel passWordVisible to show the field as a textfield.

4) Add a button to toggle the panels with m_panel.replacePanel( in_panelName_tx => 'mainPanel', in_oldPanelName_tx => 'passWordHidden', in_newPanelName_tx => 'passwordVisible');

link

answered 21 Jul, 11:12

Jan%20Willem%20Vermeer's gravatar image

Jan Willem V...
14311657
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×3

Asked: 19 Jul, 02:15

Seen: 147 times

Last updated: 21 Jul, 11:12


© Copyright Gerger 2017