I use session to compare values beforerender and afterstore
might be helpful...
BeforeRender:
// Make end strings in to array
// e.g. $cckMap['start']['11th_fret'] = array;
$cckMap['start']['lesson_files'] = explode(',', $fields['choose_lesson_files']->value);
$cckMap['start']['external_link'] = explode(',', $fields['choose_external_link']->value);
$cckMap['start']['11th_fret'] = explode(',', $fields['choose_11th_frets']->value);
$cckMap['start']['skills_concepts'] = explode(',', $fields['choose_skills_concepts']->value);
$cckMap['start']['bands_artists'] = explode(',', $fields['choose_bands_and_artists']->value);
$session = JFactory::getSession();
$session->set('cck_map', $cckMap);
AfterStore
//SESSION
// Get a handle to the Joomla! application object
$application = JFactory::getApplication();
$session = JFactory::getSession();
$cckMap = $session->get('cck_map'); // the array of initial values
// Make end strings in to array
// e.g. $cckMap['end']['blog_types'] = array;
$cckMap['end']['lesson_files'] = explode(',', $fields['choose_lesson_files']->value);
$cckMap['end']['external_link'] = explode(',', $fields['choose_external_link']->value);
$cckMap['end']['11th_fret'] = explode(',', $fields['choose_11th_frets']->value);
$cckMap['end']['skills_concepts'] = explode(',', $fields['choose_skills_concepts']->value);
$cckMap['end']['bands_artists'] = explode(',', $fields['choose_bands_and_artists']->value);
// $cckMap['end']['lesson_files'] = array()
$cckMap['cck'] = $fields['cck_value']-> live_value;
// CLEAN ARRAYS (remove duplicates)
foreach ($cckMap['start'] as $k => $v)
{
$cckMap['start'][$k] = array_filter($v);
}
foreach ($cckMap['end'] as $k => $v)
{
$cckMap['end'][$k] = array_filter($v);
}
// do stuff.....
Jon