Help!!!
I have searched this forum and have seen people talk about doing it, but I cannot figure it out for myself or found the topic that covers it.
I am trying to add a label directly in the text field that will disappear once there is data in the field. We did this in FMP by using a calculation field that determined whether the actual data field is empty or not, then stacked the two fields together. I know that this does not work in Servoy, and by reading this forum, I know that other people are getting the same effect in a different way. I saw something with tooltiptext and also with field masking, but I do not know how to implement these (at least I am unable to make it work).
Keep in mind that I am new to: a)Servoy and b)JavaScript.
Can someone please show me the way or at least give me a push in the right direction???
Thanks,
J
There are 2 ways to do this.
First Way (from servoymagazine.com front page) with label calcs:
- For each field on your list that you want to label, you need a calculation. The calc displays a label if the field is empty and displays nothing if the field has something in it:
if (!note_type) {
return ‘Type’
}
else {
return null
}
-
Assign the calc to the text of a label (%%calc_name%%), check the “displaysTags” property of the label and assign a font and color to the label.
-
Put this label behind the field it describes and set that field to “transparent” so the label shows up through the field.
Second way with scripts is at http://forum.servoy.com/viewtopic.php?t=449
I still think there is another way to do it (from my research in other posts on this forum), but the snippet from Servoy Magazine will get me where I am going.
Thanks for all the help (even from people who sent me email directly).
J
This is not working correctly. Once the data is entered, it is not clearing the display field until after the record is committed (in other words, until you click out of the form) If you try to tab through the fields, the displays are still showing up until you leave the fields.
Any other suggestions?