What you are trying to achieve does make sense
If you dynamically set the class .dk-speakout-petition on the form element to display:none; it will hide the form itself. You can test it in your browser developer tools. I made it happen https://gyazo.com/d574f42b405f03b9bcd52fe94d994d77
The only problem is that your changes may be over-written with an upgrade. But I doubt the code will be more than a couple of lines so you could always re-add it.
If you do get this to work, please submit the code here and I will look at adding it as an option.
If I add the following code to petition.css
.dk-speakout-petition {
display:none;
}
It will make the form disappear entirely, meaning that the user never sees it in the first place. I only want the form to go away after the user’s response has been submitted. Am I misunderstanding your instructions?
Kind of.
There is code to make the acknowledgement box appear after the form is submitted. At the same time that is when to vanish the form instead of making it opaque
/wp-content/plugins/speakout/js/public.js
Line 108
change
$( '#dk-speakout-petition-' + id + ' .dk-speakout-petition' ).fadeTo( 400, 0.35 );
to
$( '#dk-speakout-petition-' + id + ' .dk-speakout-petition' ).hide();
//$( '#dk-speakout-petition-' + id + ' .dk-speakout-petition' ).fadeTo( 400, 0.35 );
FWIW, you could get very creative with the jquery CSS modifications and hide that little gap under the green box, hide the “read petition” box, change colours, anything you like.
But do keep a backup of the file (public.js.copy) in case I ever update the file and you lose your customisation.
Actually, I have added both lines to the code with instructions on how to switch from fade to hide, so from the next upgrade, the code will always be there, you will still have to activate it if the script is updated though.
This is awesome, thank you so much for your prompt responses.