Ajax call on a form with two models only passing one model

I have created a form that includes two models (Job and Artwork) which works perfectly fine. I have added a radioButtonList to Artwork that onchange will make an Ajax request. However when one of these values are changed the Ajax call will only send (via GET) the Job fields and no Artwork fields.




<div class="row">

    <?php echo $form->labelEx($artwork,'printingType'); ?>

    <?php echo $form->radioButtonList($artwork,'printingType', $artwork->getPrintingTypes(),

                   array('onchange'=>CHTML::ajax(

                        array('type'=>'GET', 'url'=>array(

                              'job/loadArtworkForm'), 'update'=>'#data')))

               ); ?>

    <?php echo $form->error($artwork,'printingType'); ?>

</div>



Has anyone experienced this before? How can I have the Ajax call pass values for both models?

I worked it out.

I was trying to gather the variable with $_GET[‘Job’][‘printingType’] rather that $_GET[‘Artwork’][‘printingType’].

Silly mistake.