Next, you can add the following code, in the active theme's "functions.php" file:
add_action('cred_save_data', 'my_menu_order_action',10,2);
function my_menu_order_action($post_id, $form_data)
{
// if a specific form
if ($form_data['id']==123)
{
if (isset($_POST['menu-oder']))
{
$my_post = array(
'ID' => $post_id,
'menu_order' => $_POST['menu-oder'],
);
// Update the post into the database
wp_update_post( $my_post );
}
}
}
Note: Please replace "123" with the actual CRED form's ID, that you'd like to target for this action.