autofill recipients on multisites
-
What is the code to automatically grab the webmaster or administrator’s email in the recipient field?
This is for multisites. I want to create multisites without having to manually update the recipient’s field each time.
Thank you,
Stephane
-
This plugin uses
get_option('admin_email')
to find the admin email.
line 1882 of si-contact-form.php
I do not know enough about multi-site to know what to change to pick the right email for all your sites.
How did you install the plugin? it network activated?If anybody has suggestions I would like to know.
This might work. Are you handy enough to test it?
You may have to delete the plugin and allow it to delete the data.
Then, FTP upload the entire /si-contact-form/ plugin folder with this modified file before you activate it again.edit si-contact-form.php around line 1879
change
$si_contact_option_defaults = array( 'form_name' => '', 'welcome' => __('<p>Comments or questions are welcome.</p>', 'si-contact-form'), 'email_to' => __('Webmaster', 'si-contact-form').','.get_option('admin_email'),
to
if (function_exists('is_multisite') && is_multisite()) { $admin_email = get_site_option( 'admin_email' ); } else { $admin_email = get_option('admin_email'); } $si_contact_option_defaults = array( 'form_name' => '', 'welcome' => __('<p>Comments or questions are welcome.</p>', 'si-contact-form'), 'email_to' => __('Webmaster', 'si-contact-form').','.$admin_email,
I don’t seem to be handy enough. I changed it the way you suggested but it keeps showing me the old code.
Could I hire you to do it?
Could I hire you to do it?
When I researched this I discovered I do not need to add this code because the form grabs the get_option(‘admin_email’) which is the administrator of each individual site.
get_site_option( ‘admin_email’ ) is the administrator of all the sites.
So what one do you need? and if it is site “administrator of all the sites” that you need, please explain why each site does not have the correct admin set that you want. I am confused why the individual blog site admin is not the desired recipient.
What do I have to type in that field in order to trigger the Administration email as the one who receives the form data?
Is it Webmaster? admin_email? Administrator?
It was written in that field by default Webmaster but it doesn’t seem to send to the administrator.
My goal is that each child-site owner receives the data.
Thank you Mike!
The administrator of each individual sites IS the recipient.
I put admin_email in the recipient like this but nothing sends to that recipient and I also get an error message: http://screencast.com/t/ZCPRihef3xsN
But from re-reading your message, I think I need to put get_option(‘admin_email’)
But when I do, I get this error message again: http://screencast.com/t/tlhUjM8h
On the form edit page, you cannot add PHP code into the settings. The setting you are having errors with expects an email address.
How do I do this then?
Is there a solution?
I need to have the same information as this site replicates across multiple sites. I can’t create a form for each individual site, it would be too long. That’S why the form replicates across all site and need to pick the administrator of each individual site as the recipient.
Thanks for your help.
You said “the form grabs the get_option(‘admin_email’) which is the administrator of each individual site.”
How do I type this in the form recipient so that it automatically send the form results to the administrator of each site without me having to add their email address in the form plugin?
I found this information, hope it helps:
http://wordpress.org/support/topic/plugin-imsanity-multisite-supportHello stephanepage!
I was reading up and looking around the forums and I found that you were looking for a way to all sites on a multi-site setup with a few changes per site owned by sally, chris, etc.
I noticed that you solved this and are automatically updating all the content!!
How did you manage this!! I need to do this for a client of mine, and I only can find the replicator and only doing it for brand new sites.
- The topic ‘autofill recipients on multisites’ is closed to new replies.