Is there away to make the textbox of a lookup read-only?

Posted by jquerijero on 02-Dec-2014 13:19

I just want to make the textbox portion of the lookup read-only, so the user can only select using the button. 

Is this possible?

All Replies

Posted by Orchid Corpin on 02-Dec-2014 13:41

Try this JQuery code. Change the R123456 with your lookup name.

<script>
$(document).ready(function() {
    $("#txtR123456").attr("readonly", true);
});
</script>

Regards,
Orchid

Posted by Orchid Corpin on 04-Dec-2014 16:30

Hi,

Does the code above works for you or do you have other questions related to this thread?
Thank you.

Regards,
Orchid

Posted by jquerijero on 04-Dec-2014 16:40

Where do you add the script in Rollbase? Is this just a script that you drop on the page?

Posted by Orchid Corpin on 04-Dec-2014 16:51

When you go to "Design this Page" of new and edit page there is a Script Component in the left panel, drag it to form page and edit it to add the script/code. See image below.

You can add HTML, Javascript, CSS and other Rollbase front-end API codes there.

Hope this may help.

Regards,
Orchid

Posted by jquerijero on 04-Dec-2014 17:05

The code worked.

Posted by Orchid Corpin on 05-Dec-2014 07:35

That's great! :)

Regards,

Orchid

This thread is closed