Make Label from Placeholder

Maurice INZIRILLO wrote in 4DBB today:

I found an interesting topic „To Placeholder or not?“, this morning started by Sujit Shah on 4D iNug.
Based on this discussion, I discovered the Mobile Form Interaction by Matt D. Smith, and below you can found my version for 4D!

I’d seen the discussion myself. Good ideas spread und better yet, exchange of solutions adds further to the wealth of the idea. I’ll add my 2 cents.

I’m too lazy to follow Maurice path. That would mean adding code to every form-object. No go! And I’m too mean to create a label of type variable and duplicate that variable. A text-object should fit. Finally, if I add a placeholder to an object, I’m not going to remember other adjustments. So it should just work when reloading the form.

So I build on Maurice foundation the solution I prefer. Here it is

    • create one text object as master-label


    • call JVFloatLabeledTextField („jfvLabelObj“) from the form-method, passing the object name of that text object


  • activate the events: On Load, On Clicked, On Getting Focus, On Losing Focus and On After Edit for the form only

My version of JVFloatLabeledTextField can be downloaded here as text.