You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Problem

Populate value in a popup form opened by Form Grid with an existing value in parent form. 

Code

Put the code below in the Popup Form

<script type="text/javascript">
    $(document).ready(function(){
        var mainFormField = "courseName";
        var fieldId = "course";

        //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>
  • No labels