2

I know I can turn submissions being saved in the database either on or off completely.

Is there a way I can avoid the submission is saved basing on the value selected for a form element, for example a Yes/No radio button?

0

1 Answer 1

3

You can use a WebformSettingsHandler to conditionally disable the saving of results.

enter image description here

4
  • Hi Jacob, Thanks heaps for this. However, when I implement this, though the submissions are not appearing in the results view, but the count seems to be affected. The next submission (that should be saved) does have the serial number jumped by the numbers of submissions not saved as well. So, if last submission is No. 19, I then tested two submissions that should not have been saved, then I submitted one that should be saved but it appears with No. 22 in the view rather than the 20th submission. Is this also fixable, otherwise it can create confusion for proper order count. Please advise. Jan 11 at 1:27
  • I can confirm that the serial incrementing is an unexpected behavior. Feel free to create a ticket in the webform module's issue queue. This might be something we can't fix because people might be relying on this behavior. Still, it would be possible to provide a simple patch.
    – jrockowitz
    Jan 12 at 7:19
  • Thanks Jacob. I shall. Jan 18 at 6:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.