I have an edit form with a dropdown field that lists the available connected records from another object. (a connection field)
When I submit the edit form I want to get the value of the selected dropdown so I can use zapier to update the corresponding record.
This is the code I have
/ Change view_1 to the form view you want to listen to
$(document).on(‘knack-record-update.view_788’, function(event, view, record) {
alert(‘Form submitted!’);
var value = $(‘input[name=“field_552”]’).val();
console.log(value)
});
the output of this when I submit the form is “%5B%7B%22id%22%3A%2261f1dd389bf9b78ce8aa0c03%22%2C%22identifier%22%3A%22Woodside-17%22%7D%5D”
What I am looking for is “woodside-17”
I have also tried these options
var value = $(‘view_788-field_522’).val();
var value = $(‘field_522’).val();
var value = $(‘view_788-field_522 :selected’).text();
var value = document.getElementById(‘field_552’).value;
All of these returned a null value.
any help on this would be great.