Java script - transfer value from parent table to a child table
Confluence User - 25 Apr, 2016
Hi All,
I have below question.
How can I transfer value from parent table to a child table, but in case parent table hasn't been submitted yet.
I was using below code, but it works only after parent table has been submitted before adding some grid elements.
Is it possible, if yes any idea how to make it?
<script type="text/javascript">
//script which is moving vendor data from parent table
$(document).ready(function(){
var mainFormField = "cpo_cpo_number";
var fieldId = "3pp_cpo_number";
//get value from parent form
var value = $('[name='+mainFormField+']:enabled', window.parent.document).val();
//store the value to a field
$('[name='+fieldId+']:enabled').val(value);
});
</script>
javascript;forms
