Autocomplete prompt text not showing

Autocomplete prompt text not showing

I have implemented an autocomplete and want to change the default "Type or double-click for list" prompt text to "type postcode or suburb".  I've changed the Prompt property.  When the page is loaded my custom prompt text is momentarily shown but then overridden by the default text.

You can see it here
Hi Gavin,

I've made a quick test and cannot reproduce your problem. Are you using some kind kind of javascript to manipulate inputs?
If that's the case, maybe the javascript is interfering with the promp.
Hi Gavin,

Did you check on your browser console if you're getting some javascript errors?
And inspecting the html element containing the prompt, did you saw the text you're expecting?

Kind Regards,

Hi Gavin,

The input prompt of some widgets was broken in Latest versions should have no issues with it.
What version are you using?

João Rosado
The auto completes (2) are in a web block with no javascript etc.  There is an error on the home page containing the web block to do with (below) but I've tested it on a page with nothing other than the web block and it still behaves the same.  

GET 404 (Not Found)

If I inspect the element (below), the placeholder text has been replaced.

<input name="wt2$wtPOSTCODE_SUBURB_FROM" type="text" maxlength="108" id="wt2_wtPOSTCODE_SUBURB_FROM" placeholder="Type or double-click for list" onkeydown="return OsEnterKey('wt2_wt20', arguments[0] || window.event)" style="width: 90%" class="os-internal-ui-autocomplete-input" autocomplete="off" role="textbox" aria-autocomplete="list" aria-haspopup="true">

I'm using but I will upgrade to and see if that fixes it, fingers crossed :)  If it doesn't help I'll try and create a 'clean' test project.

Thanks JF, GM & JR for your help so far.

This is the code that sets the prompt in Richwidgets v8.0.0.12 AutoComplete WB

"<script type=""text/javascript"">
$(function() {var inpid='" + InputWidgetId + "';
var inputData=OsInputPrompt_GetInputData($('#'+inpid));
var prompt = (inputData || {}).prompt;
if ('ontouchstart' in document.documentElement) { //mobile phones
OsInputPrompt_Bootstrap(inpid, '" + "Type or tap for list" + "');}
else { OsInputPrompt_Bootstrap(inpid, '" + "Type or double-click for list" + "');}

I think this code runs before the code that sets the SS prompt, with prevents last one from setting new prompt.

Just a guess
I am using Outsystems Service studio and i am having the same issue where I am unable to change the text.. any help will be much appreciated...
Hi Sue.
I have come across that same problem as well. I "solved" it by creating my own autocomplete as a forge component. I know, it's not a fix, but more of a rewrite.

It's usage is very different, so you would need to invest some time to learn the basics. But in a few projects that I've used it, it opened up a whole set of possibilities to enhance user experience. Make sure to give it a look!
Hi Leonardo,

Thanks for the suggestion.. I am new to Outsystems as well (as you might have guessed) I will try creating my own Automcomplete based on the requirments or re-use(if that is ok?)

Yes, the OutSystems forge components were made to be reused!
Don't reinvent the wheel.
Currently using and this is still occurring.

Due to time constraints I haven't checked Leonardo Fernandes version, but decided to override the placeholder text instead, with the following code in the web screen's Javascript property:

/* Handler that renames the autocomplete prompt when the DOM gets loaded */
$( document ).ready(function() {
    setTimeout(function(){ reset_OsInputPrompt_Bootstrap_prompt(); }, 100);

/* Function to be called by HTTPRequestHandler.RunJavascript action which is called by the Search and Reset filter screen actions */
function reset_OsInputPrompt_Bootstrap_prompt()
    $('.AutoCompletePrompt').attr('placeholder', 'Isn't this a cool autocomplete prompt???');

AutoCompletePrompt class was assigned to the input text box so that the reset prompt function could work.

It's still not 100% fine because the default prompt still gets to be seen between the user clicks, but since its color is pretty dim it gets past the user's attention, i guess... any suggestions?
Is it fixed by now?
Or are we stuck still with the forge component?
Or pedro's fix?
C'mon! The forge component is awesome! :)

But, if you still want to fix this, you can paste the following code in your eSpace javascript:

OsInputPrompt_GetInputData = (function(orig) {
    return function(el) {
        var inputData = orig(el);
        inputData.prompt = inputData.prompt || el.attr("placeholder");
        return inputData;
No other changes to your application are required.

EDIT: Note that it will have the same effect on the inputs with a date picker, since they also override the prompt text with a dummy text.