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?
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.
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.
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.
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].
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"
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.