Expand my Community achievements bar.

How do I make a TextField unselectable?

Avatar

Level 2

Hello!

I'm trying to use a TextField like a watermark on the Master Page.

The TextField has Javascript associated with a button on the User page.

The Javascript (when the criteria is met) changes the default text of "DRAFT" to "" (essentially removing the "watermark").

I was wondering, is there any way to prevent form users from being able to highlight/select a TextField?

It's a minor tweak, and if I can't fix it I'll just accept it... but I'd just prefer that users weren't frequently clicking into the background field by accident (it annoys me already and I've only opened the thing twice).

Thanks for your input.

(P.S. I could potentially just make it visible on print, but I'd prefer tha users knew that the form isn't ready beforehand).

7 Replies

Avatar

Level 7

How about turning the watermark into an image and sticking it on the master page? That would make it unselectable and not interfere with your form design.

Avatar

Level 2

This is a helpful answer. But it's not what I'm looking for exactly.

Given that this whole this is still in development, a TextField is preferable to my uses.

But using an Image field will probably work if I can't find a solution to the question.

Thanks for your reply.

Avatar

Level 7

I don't know of any way to stop a user from clicking into a text field. No matter what the access attribute is set to, the user will still be able to click into the field even if you overlay another field that the user can't click into (for example, a blank image field). You can stop them from tabbing to a field, but not from directly clicking on it.

Avatar

Level 2

Alright. Guess I'll leave the question open for a bit more before I close it out.

Avatar

Level 2

WordArt.BMP with an Image object seems to work best (NOT Image Field, lol).

Thanks for the reply.

Too bad I couldn't get the TextField working... Ah well.

Avatar

Former Community Member

How about making it a button?

You could change the button caption to the desired text, for example,

form1.page1.resolveNode("btn.caption.value.#text").value = "Arsenal 2 - Manchester City 0";

Steve

Avatar

Level 10

Hi,

If you put the textfield on the master page and set the value to read only on the Object / Value tab.

Then in the enter event have a script setting the focus on another field.

xfa.host.setFocus(page1.TextField2); //if a user tabs into the watermark, they will be sent back to the form...

When you have finished with developing the form, I would take the object off the master page. EG when the criteria is met, set the presence to hidden.

Good luck,

Niall