Select Field Update Text fields

Good evening,

I have a form for a customer to submit a support request. The issue I am having is that I want a few fields (vendor, model, warranty end date) to automatically be populated when I select the serial number. The only way I have been able to do this is to create additional Select Fields that are updated when the Serial number is selected, as well as limit the displayed results with a SQL WHERE clause.
While this does what I want the field still looks like a select field and I want it to look like an un-editable text field.

Is there a better way to do this?

Hi Keith,

For all the fields (vendor, mmodel, warranty end date) that you want as un-editable, go to Fields in left submenu in the Form application, select the field and enable the option ‘Label Field’. It will allow you to have a field which is only of a display purpose.

You can than write a code on onChange Ajax event of the serial number which will allow you to change the values of label field according to the serial number.

Hope that’s what you needed. Let me know if you have any doubt.

Good morning,
Thank you for the reply. I created a new label field called Type as you mentioned and an Ajax event on the serial number field.

My next question would be how do I change the text associated with the label and not the label name itself.

thanks,

Keith

Hey Keith,

Can you please explain me with the screenshot, I think I am being confused.

What I understand is, whenever customer input the serial number, three fields, they are vendor, model and warranty end date should be displayed automatically from the database, right?

So if this is the case write the below code in the onChange event of serial number.

sql = "SELECT vendorName, modelNumber amd warrantyEndDate FROM device WHERE serialNumber = '{serialNo}'" // here serialNo is the field name in the form.
sc_lookup(res,sql);
{vendor_name} = res[0][0]; // vendor_name is the field name in the form
{model_no} = res[0][1]; // model_no is the field name in the form
{war_end_date} = res[0][2]; // war_end_date is the field name in the form

Ignore any syntax error, if present.

Dont forget to make vendor_name, model_no and war_end_date as the label field.

Do let me know if this work or explain me with screenshots if I am unable to understand your real problem.

sorry about the delay. I was able to get this to work. Thanks