我正试图用如下的注册程序制作一份登记表。能办到吗?
这些是登记表的字段。
Username
Email Address
First Name
Last Name
Contact Tel No
Company Name
Address (room for 3 lines of text)
Postcode
Industry (drop down list)
Product Interests (tick box / multi choice)
Status (drop down list: End User, Reseller/Partner, Distributor, Other). If other selected then 'Other' free type box appears.
data consent tick box (a tick box which is default to being 'ticked' should show 'Opt-in to receive relevant information concerning products and services')
anti-spam widget (to avoid robots trawling the site can we add an anti-spam verification box for submissions)所有字段都是强制性的*
'Reseller/Partner',则流程如下:屏幕上的确认消息:
“谢谢你注册成为合伙人。这一请求需要授权,在自动注册完成后不久会通知你。”
这类事情能做吗?
谢谢
发布于 2012-02-11 12:58:54
结果就是不这么做。正如在另一个答案中提到的,引力形式可能有效,但不确定,因为我从未使用过它。我只是离开了注册的原样,并手动改变了人的角色。
发布于 2011-12-05 14:27:05
对于这样的东西,我想看看重力表单插件。http://gravityforms.com
它允许您有条件逻辑,其中一个字段只有在选定某个字段时才会显示。在这种情况下,我会做出不同的重力形式,只有在标记了复选框(经销商/合作伙伴.等等)时才会显示。这样,您可以为每个部分有不同的字段,每个表单可以发送不同的确认电子邮件。它也可以过滤来自地心引力表单的输出电子邮件,这是基于特定条件的钩子。确认消息也是如此,您可以添加html来调整消息以满足您的需要。
发布于 2013-08-17 12:14:39
我也试着做同样的事情,最后,经过大量的努力,我找到了解决方案。
二手插件:http://wordpress.org/plugins/wp-roles-at-registration/
将这些行添加到function.php中
add_role('user', 'User', array(
'read' => false, // True allows that capability
'edit_posts' => false,
'delete_posts' => false, // Use false to explicitly deny
));
remove_role( 'company' );
add_role('company', 'Company', array(
'read' => true, // True allows that capability
'edit_profile' => true,
'delete_posts' => false, // Use false to explicitly deny
));在我这边一切都很好。
https://wordpress.stackexchange.com/questions/35580
复制相似问题