-
- 24,544 Posts
Try casting the fields to (int) before saving them.
$process->set('request',(int) $request->get('id'));
$process->set('customer', (int) $request->get('customer'));
-
- 24,544 Posts
Are you still doing the addOne() on those two fields? It should be unnecessary and could be interfering with the procedure.
The next step would be to see if the $request fields are set properly with something like this:
$output = '<p>ID: ' . $request->get('id') . '</p>';
$output .= '<p>CUSTOMER: ' . $request->get('customer') . '</p>';
die($output);
BTW, you haven't overridden the set() method in your class have you?
-
- 833 Posts
Hey BobRay, I think i know what the problem is. The submission ID retrieved via $_GET() is parsed as a string, but the customer and request fields are integer. When I manually entered the submission ID in the snippet, the values where saved properly. So now I need to convert the submissionID into an integer before saving. I hope this fixes it.
I'll report back.
[ed. note: treigh last edited this post 9 years, 4 months ago.]
A MODx Fanatic
-
- 5,888 Posts
be aware, that the user could manipulate the hidden-fields!
-
- 833 Posts
You're right. Luckily this form will be used internally by the front desk, behind a login page.
A MODx Fanatic