Hello,
I have to change dynamicly the "choice option field" of a textBox with javascript.
How to refresh the database-driven auto-complete ?
Best regards
refresh() property on a textBox
-
- Profound User
- Posts: 62
- Joined: Sat Feb 18, 2012 12:03 pm
- First Name: Patrick
- Last Name: THOMAS
- Company Name: Oo2
- Country: France
- Contact:
- Emily
- Profound Logic Staff Member
- Posts: 89
- Joined: Tue Jun 21, 2016 8:30 am
- First Name: Emily
- Last Name: Seage
- Company Name: Profound Logic
- Contact:
Re: refresh() property on a textBox
Hi Patrick,
If you need to re-render your autocomplete textbox after changing the 'choice option field' property, you can do so by using the applyProperty() API to reapply the 'field type' property of the textbox. So, after changing the 'choice option field' in your JavaScript, you could do something like this:
You will, of course, need to use the appropriate ID of your textbox in the example above but this should re-render your textbox to include the appropriate autocomplete options. If you need more information about the applyProperty() API, you can look at the following documentation page: http://www.profoundlogic.com/docs/pages ... Id=3276854.
I hope that this helps!
--Emily
If you need to re-render your autocomplete textbox after changing the 'choice option field' property, you can do so by using the applyProperty() API to reapply the 'field type' property of the textbox. So, after changing the 'choice option field' in your JavaScript, you could do something like this:
Code: Select all
applyProperty("TextBoxID", "field type", "textbox");
I hope that this helps!
--Emily
Emily Seage
Support Team Lead
Support Team Lead
-
- Profound User
- Posts: 62
- Joined: Sat Feb 18, 2012 12:03 pm
- First Name: Patrick
- Last Name: THOMAS
- Company Name: Oo2
- Country: France
- Contact:
Re: refresh() property on a textBox
Thank you Emily,
But it does not work when there are several fields displayed.
I use the latest version available.
But it does not work when there are several fields displayed.
I use the latest version available.
-
- New User
- Posts: 16
- Joined: Mon May 08, 2017 11:51 am
- First Name: Lillie
- Last Name: Yarbrough
- Company Name: Profound Logic
- Contact:
Re: refresh() property on a textBox
Hi Patrick,
Could you explain in detail what you're trying to accomplish with your textbox? What are you referring to when you mention that there are several fields displayed? The more information we have about this, the better we can support you. It may help us to better understand this if we had a dump of your screen. Could you send us a screen dump (Ctrl-F9) of the affected screen where you're experiencing this problem? To do this, visit the problem screen and press Ctrl-F9. When you are prompted to save or open the file, save the file and email it to us.
--Lillie
Could you explain in detail what you're trying to accomplish with your textbox? What are you referring to when you mention that there are several fields displayed? The more information we have about this, the better we can support you. It may help us to better understand this if we had a dump of your screen. Could you send us a screen dump (Ctrl-F9) of the affected screen where you're experiencing this problem? To do this, visit the problem screen and press Ctrl-F9. When you are prompted to save or open the file, save the file and email it to us.
--Lillie
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: refresh() property on a textBox
You should never be able to change the "choice option field", unless you're using the old (not very secure) database engine. The ability to change the code in an SQL statement is very dangerous, because it means anyone could change that SQL statement, possibly into a completely different statement.
For that reason, you should only be able to change the "parameter value" properties at run-time. The rest of the database-driven properties should only be changed in the visual designer. (Non-database related properties can also be changed.)
If you want to be able to change the actual SQL statement (different columns, table, etc) then you'll have to load the textbox in a different way. It can be done with the "choices / choice values" properties, or with the "choices url" property.
For that reason, you should only be able to change the "parameter value" properties at run-time. The rest of the database-driven properties should only be changed in the visual designer. (Non-database related properties can also be changed.)
If you want to be able to change the actual SQL statement (different columns, table, etc) then you'll have to load the textbox in a different way. It can be done with the "choices / choice values" properties, or with the "choices url" property.
Who is online
Users browsing this forum: No registered users and 1 guest