7 Replies Latest reply on Jun 19, 2013 12:11 PM by tays01s

    Conditional formatting: On field entry

    tays01s

      Title

      Conditional formatting: On field entry

      Post

           Is there a way of triggering conditional format at field entry? Eg. change from transparent to white background as soon as you click into the field? Note, it is not enough to have the change once the field begins to be filled.

        • 1. Re: Conditional formatting: On field entry
          philmodjunk

               Not really, but maybe there's another way to achieve the same visual results. Why do you want the field to be transparent at that point in time?

                

          • 2. Re: Conditional formatting: On field entry
            schamblee

                 You can remove style / make a field invisible, when you enter the field it changes the fill color.  From the inspector under the appearance tab select "Normal State" set field as desired when in normal state then change to "In Focus" then set field as desire for infocus.                      

                 Here is a sample.

            https://www.sugarsync.com/pf/D9559058_78353709_08769  

            • 3. Re: Conditional formatting: On field entry
              tays01s

                   I've got some text boxes I want put under some fields so that when a new record is created, but nothing entered into the field, the underlying textbox reminds the user what to enter, particularly if it's a 'mandatory' field that must not be left blank when others are filled.

              • 4. Re: Conditional formatting: On field entry
                schamblee

                     I updated the sample file.  I used script triggers to skip the field and then conditional formatting on a * next to the fields.  The * is invisible if the field doesn't need data or red if it require data entry.  You can use script tiggers to not leave the record until the field is filled out also.

                https://www.sugarsync.com/pf/D9559058_78353709_08769  

                      

                • 5. Re: Conditional formatting: On field entry
                  tays01s

                       The 'Normal' vs  'In focus' state trick is v. neat. One thing I don't understand: I had been using Conditional formatting: not Is Empty(fieldname) with 'fill colour' = white to switch from transparent once the field is filled. However, if 'in focus' is set to white it switches from transparent both when entering the field and when exiting it providing the field is filled. Isn't the latter NOT 'in focus'? [I have unchecked my Conditional format before trying this].

                        

                       Here's my ignorance of scripts: I don't understand the significance of 'local variables' ($$ makes them global to the file) or how "T", "F" indicate true/false and trigger the condition.

                        

                       *: again, neat idea. Is this simply put in an invisible textbox over/next to the field? [I didn't find/trigger this in the eg].

                        

                  • 6. Re: Conditional formatting: On field entry
                    schamblee

                         If you use the "In focus' state / normal state, you don't need to use global varibles.  Filemaker tracks In focus and normal state automatically.

                          

                         I used script triggers to disable entry into the field.   Local varibles can only be used in the current running script. Global variables can be used anywhere in the file.  You can used anything to in your variable as long as you know what it means.  It pretty much know that T = True, and F = False.  It that simple. 

                         Yes the text is made invisible when created by remove all style or by changing in "Normal State" and making visible in "In Focus State"

                    • 7. Re: Conditional formatting: On field entry
                      tays01s

                           One situation I found the 'In focus' not to work with was a date field containing a pop-up calender. With this the field remains transparent except whether activating the calender. Again I'd like for a new record the label 'birthdate' to show.

                            

                           Once the calender has been used, I'm happy for the calender and white fill to cover the label so I formatted the 'Date of birth' label under the field to if 'not isEmpty' text/fill = white.