unable to handle request on form submission
-
Hey,
In my pod (form on frontend) I have checkboxes which, when checked, creates an item in another pod through pods_api_post_save_pod_item. I have build my code like this:
$non_actief = $paard_pod->field('non-actief'); //checkboxes $add_dossier = $paard_pod->field('add_dossier'); $verwijderen = $paard_pod->field('verwijderen'); if($non_actief) { delete_post_meta($id, 'groep'); if($add_dossier) { $data = array( 'paard' => $id, 'author' => $user, // User ID for relationship field 'opmerkingen' => 'Non-actief gezet', 'verschijndatum' => date('d-m-Y') ); $dossier_pod->add( $data ); $paard_data = array( 'add_dossier' => false ); $paard_pod->save($paard_data, $id); } }elseif($verwijderen){ $paard_verwijderen->delete($id); }else { if($add_dossier) { $data = array( 'paard' => $id, 'author' => $user, // User ID for relationship field 'opmerkingen' => 'Terug actief gezet', 'verschijndatum' => date('d-m-Y') ); $dossier_pod->add( $data ); $paard_data = array( 'add_dossier' => false ); $paard_pod->save($paard_data, $id); } }
It all works fine but when I check the box for ‘non-actief’ it shows an popup saying ‘unable to handle request’ (wp-admin/admin-ajax.php?pods_ajax=1&action=pods_admin 500 error) but the code has run and worked! It also only happens with that particular checkbox. The others work fine.
I can’t seem to find what happens here? Could someone help me?
Thanks,
MartThe page I need help with: [log in to see the link]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘unable to handle request on form submission’ is closed to new replies.