本文主要是介绍wordpress表单调用_如何使用WordPress为非营利组织创建捐赠表单,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

wordpress表单调用
Do you want to be able to accept donations on your nonprofit website? WordPress makes it easy for nonprofits to create a donation form and accept donations from their website. In this step by step guide, we’ll show you how to setup your own custom WordPress donation form, step by step.
您是否希望能够在您的公益网站上接受捐赠? WordPress使非营利组织可以轻松地创建捐赠表格并从其网站接受捐赠。 在本逐步指南中,我们将逐步向您展示如何设置自己的自定义WordPress捐赠表格。

The simplest way to solicit donations on your website is by adding a Paypal donate button, but it’s not the right solution for everyone.
在您的网站上募集捐款的最简单方法是添加“ Paypal捐款”按钮 ,但这并不是适合所有人的正确解决方案。
Creating a custom donation form on your website instead of using a donation button allows you to:
在您的网站上创建自定义捐赠表单(而不是使用捐赠按钮)可以使您:
- customize the form fields to gather the information you need 自定义表单字段以收集所需的信息
- keep donors on your own website for a more professional experience 将捐助者留在自己的网站上以获得更专业的体验
- ask donors if they want to subscribe to your email newsletter in the same form 询问捐助者是否要以相同的形式订阅您的电子邮件通讯
- use other payment processors besides Paypal, such as credit cards (Stripe) 使用Paypal以外的其他付款处理商,例如信用卡(条带化)
- integrate with other third-party software such as a CRM or cloud storage 与其他第三方软件(例如CRM或云存储)集成
As you can see, there are plenty of benefits to keeping donors on your own website instead of redirecting them to Paypal.
如您所见,将捐赠者保留在您自己的网站上而不是将他们重定向到Paypal有很多好处。
You might think setting up a donation form on your website would be a tricky process, but there are WordPress plugins for non-profits that makes it easy.
您可能会认为在网站上设置捐赠表格是一个棘手的过程,但是有针对非营利组织的WordPress插件可以简化这一过程。
Having said that, let’s take a look at how to create a custom donation form in WordPress.
话虽如此,让我们看一下如何在WordPress中创建自定义捐赠表单。
影片教学 (Video Tutorial)
演示地址
If you don’t like the video or need more instructions, then continue reading.
如果您不喜欢该视频或需要更多说明,请继续阅读。
在WordPress中创建自定义捐赠表单 (Creating a Custom Donation Form in WordPress)
WPForms is the best drag and drop form builder for WordPress. It has a beginner-friendly interface and includes pre-built form templates including a donation form template to make the process even faster.
WPForms是适用于WordPress的最佳拖放表单生成器。 它具有初学者友好的界面,并包括预构建的表单模板,其中包括捐赠表单模板,以使流程更快。
WPForms is a premium WordPress plugin created by WPBeginner’s founder, Syed Balkhi.
WPForms是WPBeginner的创始人Syed Balkhi创建的高级WordPress插件 。
To create a donation form that can process payments, you’ll need the Paypal or Stripe addon for WPForms. Both addons are included with the Pro and Ultimate licenses.
要创建可以处理付款的捐赠表格,您需要WPForms的Paypal或Stripe插件。 这两个插件都包含在Pro和Ultimate许可中 。
步骤1:安装并激活WPForms (Step 1: Install and Activate WPForms)
First thing you’ll need to do is download the WPForms WordPress form builder plugin.
您需要做的第一件事是下载WPForms WordPress表单构建器插件 。
You can do this by logging into your account at WPForms and download the plugin.
您可以通过登录WPForms的帐户并下载插件来完成此操作。

Then you’ll need to install and activate the plugins. You can see our step by step guide on how to install a WordPress plugin for more details.
然后,您需要安装并激活插件。 您可以查看有关如何安装WordPress插件的逐步指南, 以了解更多详细信息。
步骤2:建立您的捐款表格 (Step 2: Create Your Donation Form)
Now that WPForms has been installed and activated, you can go ahead and click on WPForms » Add New to get started.
现在已经安装并激活了WPForms,您可以继续单击WPForms»Add New以开始使用。
You can name your form at the top of the page. We’re going to name ours “Nonprofit Donation Form.”
您可以在页面顶部为表单命名。 我们将其命名为“非营利组织捐赠表格”。
You’ll see a list of pre-built form templates you can choose from. Hover over the Donation Form template and then click the Create a Donation Form to build your form.
您将看到可以选择的预制表单模板列表。 将鼠标悬停在“ 捐赠表单”模板上,然后单击“ 创建捐赠表单”以构建您的表单。

You’ll see a popup reminder that says “Don’t Forget: Click the Payments tab to configure your payment provider.” We’ll do that in the next step. For now, you can click OK and take a look at your form.
您会看到一个弹出提示,提示“别忘了:单击“付款”标签以配置您的付款提供商。” 我们将在下一步中进行操作。 现在,您可以单击“ 确定”并查看您的表单。

The donation form template includes fields for:
捐赠表单模板包括以下字段:
- Name 名称
- Email 电子邮件
- Donation Amount 捐款金额
- Comment or Message 评论或留言
The Donation Amount field is a Single Item field where users can type in any amount they want to donate. You can also use multiple choice or dropdown fields instead.
“捐赠金额”字段是“单个项目”字段,用户可以在其中键入要捐赠的任何金额。 您也可以改用多选或下拉字段。
In this tutorial, we’ll show you how to add a multiple choice payment field with several donation amounts to choose from, and an option to enter a different amount.
在本教程中,我们将向您展示如何添加具有多个捐赠金额的多选支付字段,并提供输入不同金额的选项。
To add the multiple choice payment field, click the Multiple Items button under Payment Fields. You can drag and reorder the fields so that the Multiple Items field is directly above the Donation Amount field.
要添加多重选择支付领域,单击下支付领域的多个项目按钮。 您可以拖动字段并对其重新排序,以使“多个项目”字段位于“捐赠金额”字段的正上方。

Now you can click on the Multiple Items field in the form preview to change the options.
现在,您可以单击表单预览中的“多个项目”字段来更改选项。
Go ahead and change the label to say “Donation Amount.” Then you can enter whatever amounts you want, and an “Enter amount” option.
继续,将标签更改为“捐赠金额”。 然后,您可以输入所需的任何金额,以及“输入金额”选项。

Now we need to change the Single Item field to only display when the “Enter Amount” option is selected.
现在,我们需要将“单个项目”字段更改为仅在选择“输入金额”选项时显示。
Click the Single Item field to edit the options. Make sure the “Required” checkbox is not checked, or it will prevent users from submitting the form if they selected a donation amount in the multiple choice field above.
单击单个项目字段以编辑选项。 确保未选中“必填”复选框,否则如果用户在上方的“多项选择”字段中选择了捐赠金额,则将阻止用户提交表格。

Now you can scroll down a bit and click Conditionals to enter the display settings for this field.
现在,您可以向下滚动并单击“ 条件”,以输入该字段的显示设置。
Next, check the “Enable conditional logic” checkbox. Then select the option to Show this field if “Donation Amount” is “Enter amount.”
接下来,选中“启用条件逻辑”复选框。 然后,如果“捐赠金额”为“输入金额”,则选择显示此字段的选项。

Make sure to click the Save button at the top right to save your changes.
确保单击右上角的“ 保存”按钮以保存更改。

步骤4:设定付款整合 (Step 4: Set Up Payment Integration)
Next, we’ll set up the payment processor for your donations.
接下来,我们将为您的捐款设置付款处理器。
In this tutorial, we’ll walk you through setting up an integration with Paypal.
在本教程中,我们将引导您完成与Paypal的集成。
Setting up credit card payments with Stripe is very similar. For more details, you can check out this tutorial on using the WPForms Stripe addon.
使用Stripe设置信用卡付款非常相似。 有关更多详细信息,您可以查看有关使用WPForms Stripe插件的教程 。
You should still be in the form edit screen. From here, you can click on the Payments tab on the left, and then click the Paypal Standard option.
您仍应处于表单编辑屏幕中。 在这里,您可以单击左侧的“ 付款”标签,然后单击“ 贝宝标准”选项。

Now you can input your settings in the right side of the screen. First check the Enable PayPal Standard payments checkbox and enter your Paypal email address. Then make sure to select Donation in the Payment Type dropdown.
现在,您可以在屏幕右侧输入设置。 首先,选中启用PayPal标准付款复选框,然后输入您的Paypal电子邮件地址。 然后确保在“ 付款类型”下拉列表中选择“ 捐赠 ”。

Below that, you can enter a URL to send visitors if they cancel the checkout process. This might be a good opportunity to try to re-engage with users by sending them to a relevant blog post, or asking them to follow you on social media to stay in touch.
在此之下,您可以输入一个URL,以在访客取消结帐过程时将其发送给他们。 通过将用户发送到相关博客文章,或要求他们在社交媒体上关注您以保持联系,这可能是尝试重新吸引用户的好机会。
You can also customize the shipping address options, and choose whether to ask donors to include a note during the Paypal checkout.
您还可以自定义送货地址选项,并选择是否要求捐助者在Paypal结帐时添加注释。
For this donation form, we don’t need to use conditional logic. But you could do this if you wanted to add a donation option to another form, such a survey. Then the payment would only process if the user selected the donation option.
对于这种捐赠形式,我们不需要使用条件逻辑 。 但是,如果您想将捐赠选项添加到另一种形式(例如调查)中,则可以执行此操作。 然后,只有在用户选择捐赠选项的情况下,付款才能处理。

Be sure to click the Save button after you configure all your options.
配置所有选项后,请确保单击“ 保存”按钮。
第5步:自定义您的通知 (Step 5: Customize Your Notifications)
Next, we’ll need to make sure that donors are receiving a confirmation email after they donate.
接下来,我们需要确保捐赠者捐赠后会收到一封确认电子邮件。
To customize the email notifications for your form, you can click on Settings » Notifications.
要为您的表单自定义电子邮件通知,您可以单击设置»通知 。

You’ll see there’s a default notification that will be sent to the site administrator. You can click the Add New Notification button to create a separate notification for the donor.
您会看到默认的通知将发送给站点管理员。 您可以单击“ 添加新通知”按钮为捐赠者创建单独的通知。

Name your new notification in the popup window and click OK.
在弹出窗口中命名新通知,然后单击“ 确定” 。

We’ll need to make sure this notification gets sent to the donor’s email address that they entered into the form. Next to Send to Email Address, click Show Smart Tags. In the list that appears, click Email. You’ll see a smart tag such as {field_id="1"}
appear.
我们需要确保将此通知发送到他们在表单中输入的捐助者的电子邮件地址。 在“ 发送到电子邮件地址”旁边,单击“ 显示智能标签” 。 在显示的列表中,点击电子邮件 。 您会看到一个智能标记,例如{field_id="1"}
。

Now you can scroll down to customize the message the donor will receive.
现在,您可以向下滚动以自定义捐赠者将收到的消息。

Don’t forget to click the Save button when you’re finished setting up your notifications.
设置完通知后,请不要忘记单击“ 保存”按钮。
步骤6:在网站上放置捐赠表格 (Step 6: Place Your Donation Form on Your Site)
Now that your donation form is complete, you’ll need to place it on your website.
现在您的捐赠表格已经完成,您需要将其放置在您的网站上。
With WPForms, you can easily embed your form in any post or page using a shortcode or even place a donation widget in your sidebar or footer.
使用WPForms,您可以使用简码轻松地将表单嵌入任何帖子或页面中,甚至将捐赠小部件放置在侧边栏或页脚中。
We’ll create a dedicated donation page to display your form.
我们将创建一个专用的捐赠页面来显示您的表格。
First, click on Pages » Add New. You can enter a title for your page (we chose “Donate”). Then click the Add Form button.
首先,点击Pages»Add New 。 您可以为页面输入标题(我们选择“捐赠”)。 然后单击添加表单按钮。

Select your form from the dropdown field. Then click the Add Form button.
从下拉字段中选择您的表单。 然后单击添加表单按钮。

You’ll see a shortcode appear within your page. You can add any text or images you like to the page. When you’re ready, click the Publish button.
您会在页面中看到一个简码。 您可以向页面添加任何文本或图像。 准备好后,单击“ 发布”按钮。

Don’t forget to add your new donation page to your navigation menu so visitors can easily find it.
不要忘记将新的捐赠页面添加到导航菜单,以便访问者可以轻松找到它。
That’s it! We hope this article helped you learn how to create a nonprofit donation form in WordPress. You may also want to see our list of the best WordPress plugins for nonprofits.
而已! 我们希望本文能帮助您学习如何在WordPress中创建公益捐赠形式。 您可能还希望查看我们的非营利组织最佳WordPress插件列表。
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
如果您喜欢这篇文章,请订阅我们的YouTube频道 WordPress视频教程。 您也可以在Twitter和Facebook上找到我们。
翻译自: https://www.wpbeginner.com/plugins/how-to-create-a-donate-form-for-nonprofit-organization-using-wordpress/
wordpress表单调用
这篇关于wordpress表单调用_如何使用WordPress为非营利组织创建捐赠表单的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!