Page 1 of 1
Inline spreadsheet pass values
Posted: 25 Apr 2016
by ds4be
Hi
I am using the inline grid as per following link
http://spform.com/forms-designer- ... point-form
I would like to pass the values from the parent to the child similar to the way the id has been passed on, the fields i would like to pass the values are
Date Raised : date field internal name date_x0020_raised
Department : lookup field
Site: Choice field.
Re: Inline spreadsheet pass values
Posted: 25 Apr 2016
by rostislav
You want to auto-fill those fields in grid mode? If so, have you used the populateFieldsInGrid function, which is described in the article you quoted?
Re: Inline spreadsheet pass values
Posted: 26 Apr 2016
by ds4be
The example does not show how to populate the following fields from the parent, it just shows how to imput a standard set of data.
Date Raised : date field internal name date_x0020_raised
Department : lookup field
Site: Choice field.
Re: Inline spreadsheet pass values
Posted: 26 Apr 2016
by rostislav
For that you simply need to do something like this:
Code: Select all
fd.populateFieldsInGrid($('.related-items'), {
myField: fd.field('InternalName').value(),
etc..
});
A summary of various ways of retrieving field values:
http://formsdesigner.blogspot.com/2013/ ... -form.html
Re: Inline spreadsheet pass values
Posted: 26 Apr 2016
by ds4be
Thanks, it seemed to work for the lookup field, however when i try the date field it does not enter the date in the child item.
fd.populateFieldsInGrid($('.related-items'), {
Date_x0020_Raised: field('Date_x0020_Raised').control('getDate'),
});
fd.populateFieldsInGrid($('.related-items'), {
Date_x0020_Raised: fd.field('Date_x0020_Raised').value(),
});
Re: Inline spreadsheet pass values
Posted: 26 Apr 2016
by rostislav
.value() works fine for me. What date locale are you using (site settings -> regional settings -> locale)?
Re: Inline spreadsheet pass values
Posted: 27 Apr 2016
by ds4be
English (United Kingdom)
Re: Inline spreadsheet pass values
Posted: 27 Apr 2016
by rostislav
Send the source code of the page to
support@spform.com