Skip to main content

Using javascript called via an action, how can I get the value(s) just entered by a user on a popup screen that is bound to a model?  The component on the popup is a “Field Editor” that contains fields from a model.  How can I access what a user entered into the fields using javascript?  I tried document.getElementById but it returns null. Thanks in advance for any help.

You probably want to familiarize yourself with the skuid
Javascript API : https://www.youtube.com/watch?v=bU_m3bA1Bnk .
The basic syntax is as follows:


var model = skuid.model.getModel('Model_Name');<br>var row = model.getFirstRow();//or whatever row you want<br>var fieldValue = row.API_NAME__c;




Thats fine and I can do that with data already in the model.  I’m looking for a way to interrogate the form and get the data for 1 or mode fields at the time to form is submitted using javascript.  This is data NOT yet saved to the model and is visible on the screen because it was entered by a user.


OK, the model updates in real time. If the user made a change to a field, that change should be reflected in the model. You can check it out in the console to be sure.


How does the model update in real time if I haven’t clicked the save button which invokes “Save Model” action?


I think I understand what your saying. The popup created a “New”, “UnSaved” row which is bound to the model. using the API I should be able to get the data in the unsaved row in the model. Clicking save commits the temp row.  Is my understanding corrrect?


Bingo!