Hi
In DR 4.1.7/DNN 5.6.3, I have a field, Company, which is a Combo Box whose possible values are populated by an SQL query. This works fine.
I have a second field, Ticker (a Text Box), which I want to populate based on the value the user chooses in Company and the result of an SQL query on that value. (The table I use for both queries has the Company names and tickers in it.) Specifically, if a user chooses 'Amazon.com' in the Company field, I want to do an SQL query on that value, which returns 'AMZN' and populate this value into Ticker.
I have tried:
- This is easy to do in Dynamic Forms with a question event, but DR does not have the ability to use an SQL query to set the default value of a field in a question event.
- From what I have read, it is not possible to do the SQL query in a javascript client side event on the Combo Box.
- I saw how one can do this if the second field is a Combo Box (
http://www.datasprings.com/products...tration-11 ). I have tried doing the same with the second field as a Text Box, but there is apparently no way to make the default value populate a Text Box at the time the field is made visible as one can do with a Combo Box.
The second field needs to be a TextBox because the user needs to have the ability to input a value if none is found in the database.
Ideally, I would also be able to make the Text Box field read only if the value is found in the SQL query and leave it read/write if not.
How can I achieve what I need?
Thanks
John