Hi @arminghasemazar,
The registration fieldset element uses an ID that contains the form ID number. Something like: give-register-account-fields-1234.
You can use a wildcard to target the element like so:
fieldset[id^=”give-register-account-fields”] { display: none; }
The multi-step donation form and the donor dashboard load in an iframe, to make them more resistant to changes made in the theme’s CSS. That’s helpful for avoiding theme conflicts, but makes customizing the style of them a bit more difficult. There are two PHP code snippets in our Snippet library that will help with that process.
The first is for small changes, and adds some style inline to the donor dashboard or the multi-step donation form: https://github.com/impress-org/givewp-snippet-library/blob/master/form-customizations/css-customizations/style-givewp-iframes.php
On that one, you modify lines 16-26 with that line of CSS.
The other is for enqueueing your own CSS completely via a custom stylesheet: https://github.com/impress-org/givewp-snippet-library/blob/master/form-customizations/css-customizations/enqueue-style-for-givewp-iframes.php
If you need assistance implementing custom PHP code on your website we have this guide:
https://givewp.com/documentation/resources/adding-custom-functions-to-your-wordpress-website/
Please note that this code snippet is provided as an example of how you can extend GiveWP with code. It’s up to you to implement and customize to your liking. We cannot provide support for custom code on your website, only the code that we create and distribute.
Hi @arminghasemazar,
Just following up here. Do you still need assistance?
Hi Rick.
Thanks for the help. I solved it by adding
fieldset[id^=’give-register-account-fields’] div[id^=’give-create-account-wrap’] {display: none !important;}
and it hides the “create a new account” field.
Hi. Just have another question. “Create an account” checkbox is checked by default after form submit:
add_action( ‘give_donation_form_after_submit’, ‘my_give_register_by_default’ );
Is there anyway to see the checkbox checked before submit? meaning having the box checked already during loading the iframe. It will give more transparency to donors and also prevent confusion (since they may not select the checkbox but they will receive an email about creating a new account.
Hi @arminghasemazar,
Happy to clarify. The ‘give_donation_form_after_submit’ hook is a place/location hook, not a process hook.
In other words, ‘give_donation_form_after_submit’ tells GiveWP to place the JS snippet right after the “Submit” donation button, not after the form has been submitted.
Because the multi-step form becomes visible after all the assets have loaded, it doesn’t make much difference where you place the snippet.
Thanks for the clarification. Maybe I was too vague. What I need: when multi step form is loaded, create a new account is checked by default.
Can we get it?
Hi @arminghasemazar,
My mistake. This other snippet does the trick for multi-step form templates.
I swear I can use my keyboard most of the time.
I forgot to actually paste the link (facepalm): https://gist.github.com/rickalday/b750f9ef9eff0f2600a4b8fbe8c303c4
You know what? you always rock it.