guidogast
Posts: 51
Joined: Thu Sep 05, 2013 10:12 am

Placeholder for textbox

Mon Sep 30, 2013 9:41 am

Hello,

Is it possible to set a placeholder for textboxes (Just like the HTML5 placeholder attribute)?

If it's not possible, please move this thread to feature requests :)

Sincerely,
Guido

Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: Placeholder for textbox

Mon Sep 30, 2013 9:59 am

Hello Guido,

In order to achieve that you can select your edit box and edit the Default Value property of the related edit box to the desired value.
Please take a look on the Control Properties article which may be useful to you.

If you have other questions, please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

guidogast
Posts: 51
Joined: Thu Sep 05, 2013 10:12 am

Re: Placeholder for textbox

Mon Sep 30, 2013 1:24 pm

Hello Dan,

Thanks for your reply.

I don't mean to give a default value. I just want a placeholder, like described in my original post. It's dummy text within a textbox, if it's empty. Check http://www.w3schools.com/tags/tryit.asp ... laceholder for a clear example.
As soon as you type something in, the text disappears. But if you leave it empty, it will use the default value. However, the placeholder can be any text and can differ from the default value.

I hope this makes my feature request clear, since I don't think this function is built-in.

Sincerely,
Guido

Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: Placeholder for textbox

Mon Sep 30, 2013 4:18 pm

Hi Guido,

You cannot achieve the desired behavior due to the Windows Installer limitations. Although we have our Enhanced User Interface mechanism which allows you to design a custom interface for your installation it doesn't fulfill the placeholder HTML attribute.
However, you can try to edit the Spring theme which is HTML based, and see if you can add the placeholder attribute and fulfill your desired behavior.
  • I don't mean to give a default value.
  • But if you leave it empty, it will use the default value.
Please note that you can use the Default Value property of the related textbox control just to display a text(e.g. Type your name:).

Then you can select the [Next > ] button where the textbox is and add a new Published event. In the Edit Control Event window you can select the Set Installer property value and edit its properties like:
  • Property: field: EDIT_BOX_PROP this is the public property which is assigned to the editbox control
    Argument: field: My Name please note that My Name is the default value used
    Condition: field: MY_PROP = NULL OR MY_PROP = "Type your name:"
So, if the user let the textbox empty OR no input have been given then it will be executed this custom action and the public property that is associated with the related control is reinitialized.
As soon as you type something in, the text disappears.
I have added this improvement on our TODO list and it will be available in a future version of Advanced Installer. Thank you for your suggestion.

If you have other questions, please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

guidogast
Posts: 51
Joined: Thu Sep 05, 2013 10:12 am

Re: Placeholder for textbox

Tue Oct 01, 2013 8:16 am

Thanks!

Much appreciated!

Sincerely,
Guido

Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: Placeholder for textbox

Tue Oct 01, 2013 9:30 am

You're welcome Guido. If you have other questions, please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: Placeholder for textbox

Wed Feb 21, 2018 2:11 pm

Hello,

This was fixed in version 14.6 of Advanced Installer released on February 19th, 2018.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”