My case, on Add page:
I need a custom button after Submit button, namely "Submit and Copy".
This button should do:
- Submit the current form
- Copy the current form value to new form // something like this with return pages after add: "<MyTable>add.php?id=" . urlencode($this->id->CurrentValue)
I have conditions on:
- Row_Inserted // do something on DB
- Row_Rendered // if (CurrentPageID() == "add") {discard copied value on some fields}
- Startup Script // Set values="" for some dropdown fields
I currently set return pages after add on Submit button to Copy url above. But then user had to cancel the last input, it's not cool.
I thought of JS+Ajax, but then I need to rewrite Row_Inserted conditions twice, one on server (for Submit button) and the other on client (for Submit and Copy button). It's not cool either.
Any pointer will be much appreciated.
Thanks.