top of page
Forum Posts
rcdefazio
Aug 09, 2019
In Coding with Velo
I have a task to perform, but after wasting endless hours, I am finally about to give up on doing something that should be brain-dead simple. Here's what I want to do. I have a form that is connected to a collection called "Referrals" and there are various UserInput fields that are connected to respective columns in the collection. All that works just fine, but what I want to do is to have the user enter a code. The code is associated with a person whose first name, last name, and company name are defined in another collection called "Salespersons". When the user enters a code, let's say "XYZ", in a UserInput field (#input1), the code in the input1_blur event should extract the value entered into that field (#input1), look up that value in the Salespersons collection, return a result array, and then place the values for the first_Name, last_Name, and company_Name columns into text fields (not UserInput fields) that are placed adjacent to the UserInput field. The purpose of this is to allow the user to see that the code he or she entered is the code for the correct person before proceeding to do additional input on the form. I have tried endless combinations with .find, .get, and who knows what else is out there, but the issue seems to be these: 1. I cannot seem to log any results from the blur event in the console screen. 2. Nothing changes in the text fields after I leave the UserInput field, suggesting to me that I may be using the wrong event to begin with or that text fields cannot be updated after the page has been rendered. So, how do I make this work? I want the text fields that will display the looked up first, last, and company names to be uneditable by the end user. I will gratefully accept a workable answer no matter how arcane.
0
2
35
rcdefazio
More actions
bottom of page