I need an “after update” action for the rows in one of my models. When a user creates or edits a row in a table i want to update a field in one of the other models on the page. Is there any native skuid way to trap this event, or do i need to use jquery and add the events on the fields myself ? here’s a screenshot
as you can see there are no id’s or identifiers on the controls I’d like to end up with an id on the selects, which would let me use jquery to attach events to them. It looks like i’ll need a custom field rendered… the only examples given are for a query slider control. Are there any examples for picklists or text fields ? the other alternative would be a callback function on the save of the model. I see from the docs that if i call save myself i can get a callback // Save all changes in our Contact model contactModel.save({callback: function(result){ if (result.totalsuccess) { // Get the 15-digit Id of our newly-saved George Bailey Contact, // which will have had its Id and other fields updated after save console.log(georgeBailey.Id15); // Show the entire George Bailey Contact record console.log(georgeBailey); } else { console.log(result.insertResults); console.log(result.updateResults); console.log(result.deleteResults); } }}); the question is, can i set it up to run my callback whenever the model is saved… even if its not custom javascript that’s saving it ?
Question
can i trigger javascript when a row in a model is saved ?
This topic has been closed for replies.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
