@Margo - thanks for always assisting on some codes on this form. I am newbie on this Plumsail.
I have a scenario that i need to display address in the text control in the form based on my dropdown values.
I have a dropdown control named Location that is connected to OneDrive in excel and pulls data on that excel file. Dropdown values pull data on the "Location" column below. Below are my excel format
What i need is when Philippines is selected in Dropdown value, the "Cavite Philippines" address will display in the textbox below (example Text10) and when Nashville is selected, "Smyrna, Tennessee" will display.
I don't have experience in java script so please help on some codes. Thank you so much.
I need to display the address on the green circle below (Text10)
Just remember to change 'Location' & 'Address' to your internal SharePoint field name.
Also run this inside fd.spRendered(function)()
function showaddress(){
if (fd.field('Location').value == 'Philippines') {
// show Address in Textbox below
fd.field('Address').value = 'Cavite Philippines';
}
if (fd.field('Location').value == 'Nashville') {
// show Address in Textbox below
fd.field('Address').value = 'Smyrna Tennessee';
}
if (fd.field('Location').value == 'Washington') {
// show Address in Textbox below
fd.field('Address').value = 'Kalibo Aklan';
}
if (fd.field('Location').value == 'Aklan') {
// show Address in Textbox below
fd.field('Address').value = 'Boracay Beach';
}
if (fd.field('Location').value == 'Manila') {
// show Address in Textbox below
fd.field('Address').value = 'Metro Manila Quezon';
}
if (fd.field('Location').value == 'boracay') {
// show Address in Textbox below
fd.field('Address').value = 'Beach in Ocean';
}
}
//calling showaddress on change of location field
(fd.field('Location').$on('change', showaddress);
thank you for your code and it works perfectly. one thing i notice is that the "Location" is not saving in the data but the address is saving.. how can i save the text value of "Location"?
Ex: When i select "Philippines" in the location.. the "Cavite Philippines" is saved or capture and its perfect. But the value "Philippines" is not. how can i also capture that. So what i did is i added Text20 and hoping to mirror the Location value on that field to be able to save or capture it. but its not working.
I want the Location dropdown value ("Philippines") to be mirrored / copy in the Text20 field whenever i change the Location dropdown control.