1 2 Previous Next 15 Replies Latest reply on Nov 9, 2014 12:07 PM by JimMac

    Hide password



      Hide password


      Is there a way to hide a password? For example, if i type "password" the screen will show "•••••••".



        • 1. Re: Hide password

          This is easily done if you use Show custom Dialog in a scrip to open up a Custom Dialog.


          Specify an input field and you'll find an option for displaying the bullets instead of the actual text.


          If you want this on a regular layout, it's more difficult. There used to be fonts that consisted of nothing but bullets. If you install this font and specify it for your field, you'll get the result you want. As a quick and dirty solution, I've sometimes just specified a wingding type font for this purpose.

          • 2. Re: Hide password

            See if this helps:




            Note: using a bullet font provides very little security - users can remove/disable the font, or copy the data and paste it into another application.

            • 3. Re: Hide password

              I agree, using a bullet or other such font on a regular layout in filemaker only protects against another person reading the data while it is being typed in. Additional steps have to be taken to prevent security breaches. With current versions of Filemaker, there are usually better approaches.

              • 4. Re: Hide password


                This works great.  

                • 5. Re: Hide password

                  I know this is an older post but I've been playing around with this because I did not wan to install a "bullet font" on all of my client machines.  Utilizing script triggers I came up with a way to make this work.  It might just work on FileMaker Go as well but I'm not going to start that part of my project for a few months.  

                  You will need two fields, my table is called login and I am using global storage for both.

                  Field 1. Password - to hold the actual password

                  Field 2. Display Password - this field is actually on your layout where you enter the password into.  For this field in your layout you need to set a Script trigger OnObjectModify.  I called my script "Mask Password"

                  Here is the script:

                  If [(Length (Login::Display Password)-1) = Length (Login::Password)]

                  Set Variable [$PasswordTemp; Value: Login::Password]

                  Set Field [Login::Password; $PasswordTemp & Right (Login::Display Password;1)]

                  Set Variable [$DisplayPasswordTemp; Value: Login::Display Password]

                  Set Field [Login::Display Password; Left ( $displayPasswordTemp ; Length ( $DisplayPasswordTemp) - 1 ) & "•"]

                  Halt Script

                  End If

                  Set Variable [$PasswordTemp; Value: Login::Password]

                  Set Field [Login::Password; Left ($PasswordTemp ; Length ( Login::Display Password ))]

                  Go to Field [Login::Display Password]

                  This allows you to not only type in the password and mask it using bullets but you can backspace and correct a mistake.  If you place your cursor in the middle of the field and make a change then the whole thing falls apart, but my theory is you should not do that in a password field anyway.

                  The character typed in the field is displayed for a fraction of a second but I could not tell what it was before it is replaced with a bullet.  VPN Connection, OS Used, Computer Processor, etc. might effect this but try it out and see if it works for you.  FYI I am developing in Filemaker 11 on a Mac Core Duo 2 GHz with 2 GB RAM running 10.6 , your mileage may vary.

                  If someone has a more elegant solution let me know.  In my experience every Solution seems to have a hundred different ways to accomplish the same task.  The trick is finding the elegant one that will not drag your database to a crawl.

                  • 6. Re: Hide password

                    @ JC

                    I'm also jumping in a little late, but here is how I solved this issue without there being a possibility of seeing the character on screen not even for a split second and being able to completely edit the password, so if some user desides to just change the first character or N character, it works...

                    Hope it is usefull to someone...

                    • If [ Code(Get(TriggerKeystroke))≥28 and  Code(Get(TriggerKeystroke))≤31 ]
                    • #These are the arrow keys, the script exits and filemaker moves the selected position accordingly
                    • Exit Script [  ]
                    • End If
                    • If [ Code(Get(TriggerKeystroke))=13 or  Code(Get(TriggerKeystroke))=10 or Code(Get(TriggerKeystroke))=9 ]
                    • #this is Tab, Return and Enter
                    • Commit Records/Requests
                    • #I put in commit record because from here in my solution there is a script trigger OnObjectExit that checks to see if user name and password are correct.
                    • Exit Script [ ]
                    • End If
                    • Set Variable [ $pos; Value:Get ( ActiveSelectionStart ) ]
                    • #This is where the blinking text cursor is at in the field
                    • Set Variable [ $tam; Value:Get ( ActiveSelectionSize ) ]
                    • #This is if there is a selection, how many characters selected. So if you have: hELLo and the capital letters where selected $pos=2 & $tam=3
                    • If [ Code(Get(TriggerKeystroke))=8 or  Code(Get(TriggerKeystroke))=127 ]
                    • #For Delete and Backspace
                    • If [ Code(Get(TriggerKeystroke))=8 ]
                    • #Backspace
                    • Set Field [ SQLQueries::gINb; Case( $tam=Length(SQLQueries::gINb);""; $pos=1;SQLQueries::gINb; $pos>1;Replace ( SQLQueries::gINb ; If($tam>0;$pos;$pos-1) ;  If($tam>0;$tam;1) ; "" )) ]
                    • #First Case, if the whole thing is selected, it clears the field where the hidden password is at (gINb)
                    • #second case it is backspacing from the starting position, so no change
                    • #third case it replaces the selection with "". There are a couple of ifs, it just acts differently if there is a selection of two or more characters of just one, if there is just one you need the position to go back to before the letter you want to delete and if there are more than two you want it to start from that character and go forward.
                    • Exit Script [  ]
                    • #because there is no FALSE as the result of the script, the keystroke passes through and thus the corresponding •••• are removed
                    • Else
                    • #delete key
                    • Set Field [ SQLQueries::gINb; Case( $tam=Length(SQLQueries::gINb);""; $pos=Length(SQLQueries::gINb)+1;SQLQueries::gINb; 1=1; Replace ( SQLQueries::gINb ; $pos ; If($tam>0;$tam;1) ; "" )) ]
                    • #If the whole thing is selected set it to "", if you are at the end of the field apply no change and if not replace selection with ""
                    • Exit Script [  ]
                    • End If
                    • End If
                    • Set Field [ SQLQueries::gINb; If(($pos=1 and  Length(SQLQueries::gINb)=0) or $pos=Length(SQLQueries::gINb)+1  ;SQLQueries::gINb&Get(TriggerKeystroke); Middle(SQLQueries::gINb;1;$pos-1)&Get(TriggerKeystroke)&Middle(SQLQueries::gINb;$pos;Length(SQLQueries::gINb)-$pos+1) )  ]
                    • #This is where the actual password is set in a field not visible on a layout. If true it means that the field is either blank or the position as at the end so basic concat, if not the cursor is somewhere in the middle so it figures out where and inserts accordingly.
                    • Set Field [ Main::gBullets; Main::gBullets&"•" ]
                    • #adds a bullet to the visible field
                    • Set Selection [ Start Position: $pos+1 ]
                    • #sets position to right after last inserted character be it at the end or somewhere in the middle
                    • Exit Script [ Result: False ]
                    • #Because the keystroke has been handled accordingly if the script got this far, setting the result to false stops the actual keystroke from being entered into the bullet field.
                    • 7. Re: Hide password

                           Restaurant Charlie - Great technique. Thanks for sharing it with us. I've been looking for something like this for a long time. 

                      • 8. Re: Hide password

                             I liked both solutions, since in also intercept passwords so i can manage them in a restricted area.

                             @JC  very nice and easy.   Another tip with yours is to set Font Color light grey and field background light or white, so user can still see the • but a casual observer would have to be color blind to see the flashed character.

                             @ Restaurant Charlie...   OMG very very nice.  You are a brainiac!yes  Only limited by FMP version.


                        • 9. Re: Hide password


                               Here is a simple one that will work with FileMaker 12.


                               Create your global PIN/password field called gPIN.


                               Place the gPIN field off to the right in the gray area that is not displayed to the user.

                               Create an indexed, text calculation field called cBullets. cBullets is the field you show to users. Helvetica 24 works well for the bullets. The calculation for cBullets should be something like:



                          "PIN is too long"




                               Use an OnObjectModify script trigger on the gPIN field as follows:



                          Commit Records/Requests

                          Go to Field [ gPIN ] 



                               Use a script or an OnLayoutEntry script trigget to take the user into the gPIN field when they land on the layout.

                               Now, when they type something into gPIN, it cannot be viewed, but cBullets displays the same number of characters in bullets.

                               Note that copy/paste still works in the gPING field but this could be eliminated through Custom Menus if necessary.



                          • 10. Re: Hide password


                                 Great and simple!

                                 However, I did not manage to properly use an off-layout field in a combination NAMEFIELD + PASSWORDFIELD, in which I jump from the name field to the password field (the last one which is off-layout). This did not function with a taborder nor with a script trigger from the first field. It works perfectly, as long as the entry-field is on the layout (which I want to avoid).

                                 I've checked several suggestions, and this by far would be the simplest (thus is my favourite).

                                 Have you encountered this issue? Could you solve it?




                            • 11. Re: Hide password


                                   Sorry for delay in reply.

                                   I am using this technique with only a password field on screen, so I have not run into this problem. In my system a user has already chosen their name from a list when this password screen is presented.

                                   If you name the gPIN field with an object name does the Go to Object script step work in the triggered script?


                                   Another option might be for you to make gPIN a 2 pixel field on layout.

                                   In your scenario you might need to force the user to click a button to move to the password field, but this would be clunky.

                                   BTW - one downside of this technique is there is no cursor flashing in the field with the bullet points. If you add the pipe character ( | ) after each set of bullets it's a little better.



                              • 12. Re: Hide password

                                     Thank you for your reply.

                                     Go to Object does not work if the field you want to go to is off-layout. So I could not make it work the way suggested. I did find a solution, similar to the solution suggested by JC in 2010 (in this thread).

                                     Field A (gBullets) receives the writing
                                     Field B (gAccessPassword) receives the input from field A, character by character, after which Field A is turned into bullets (your suggestion).

                                     Writing and deleting works fine.

                                     I have it up and running in a solution right now. I am working on a solution to make this scriptbased only.

                                     Thank you for your input!


                                • 13. Re: Hide password

                                  This is easily done if you use Show custom Dialog in a scrip to open up a Custom Dialog. Specify an input field and you'll find an option for displaying the bullets instead of the actual text.

                                  This works nice within FM but when using WebDirect the dialog will crash the web frontend session and disconnect you from the server. The dialog will work fine when showed for the first time in a given session. When showing the dialog again it will display correctly but crash immediately in the moment the bullet-formatted entry field is entered.

                                  Any ideas?

                                  • 14. Re: Hide password

                                    It usually better to start your own new post.   This post you are address is old and may not pertain directly with your post now, when this post was originally made Web Direct was not available. 

                                    Things you want to test to verify if this is a bug or not is to :  Verify you have the newest updates, then make a new databases with only the dialog box and the fields required to enter a password.  Does the error occur in this new databases?  If not then, run recover on your live database to verify there is not any file corruptions.  It the error reoccurs in the new database then you may want to use the section "Report an Issue".   You will need more details, such Mac / Windows and FM version, and step taken to reproduce the error.

                                    1 2 Previous Next