Skip to main content
added 304 characters in body
Source Link
Romain P.
  • 1.9k
  • 17
  • 32

I don't want to show up the email recipients in the source code using this :

<input type="hidden" name="toEmail" value="{{ '[email protected],[email protected]'|hash }}">

I want to manage multiple emails dynamically from the contactform.php config file in my craft/config folder.

<?php

return array(
    'toEmail' => (hash('[email protected], [email protected]') ?: null),
);

This config file is not working and don't override the plugin settings in the CP. What would be the best way to achieve this ?

[UPDATE]

I ended to this, but while it is working fine in the front end, this is causing PHP errors in the CP :

<?php

return array(
    'toEmail'  => array(
        ('[email protected]' ?: null),
        ('[email protected]' ?: null)
     )
);

I don't want to show up the email recipients in the source code using this :

<input type="hidden" name="toEmail" value="{{ '[email protected],[email protected]'|hash }}">

I want to manage multiple emails dynamically from the contactform.php config file in my craft/config folder.

<?php

return array(
    'toEmail' => (hash('[email protected], [email protected]') ?: null),
);

This config file is not working and don't override the plugin settings in the CP. What would be the best way to achieve this ?

I don't want to show up the email recipients in the source code using this :

<input type="hidden" name="toEmail" value="{{ '[email protected],[email protected]'|hash }}">

I want to manage multiple emails dynamically from the contactform.php config file in my craft/config folder.

<?php

return array(
    'toEmail' => (hash('[email protected], [email protected]') ?: null),
);

This config file is not working and don't override the plugin settings in the CP. What would be the best way to achieve this ?

[UPDATE]

I ended to this, but while it is working fine in the front end, this is causing PHP errors in the CP :

<?php

return array(
    'toEmail'  => array(
        ('[email protected]' ?: null),
        ('[email protected]' ?: null)
     )
);
added 3 characters in body; edited title
Source Link
Romain P.
  • 1.9k
  • 17
  • 32

P&T Contact Form plugin : how can I dynamically add multiple email recipients inside the form config file?

I don't want to show up the email recipients in the source code. And using this :

<input type="hidden" name="toEmail" value="{{ '[email protected],[email protected]'|hash }}">

I want to manage thesemultiple emails dynamically from the contactform.php config file in my craft/config folder.

<?php

return array(
    'toEmail' => (hash('[email protected], [email protected]') ?: null),
);

This config file is not working and don't override the plugin settings in the CP. What would be the best way to achieve this ?

P&T Contact Form plugin : how can I dynamically add email recipients inside the form config file?

I don't want to show up the email recipients in the source code. And I want to manage these emails dynamically from the contactform.php config file in my craft/config folder.

<?php

return array(
    'toEmail' => (hash('[email protected], [email protected]') ?: null),
);

This config file is not working and don't override the plugin settings in the CP. What would be the best way to achieve this ?

P&T Contact Form plugin : how can I dynamically add multiple email recipients inside the form config file?

I don't want to show up the email recipients in the source code using this :

<input type="hidden" name="toEmail" value="{{ '[email protected],[email protected]'|hash }}">

I want to manage multiple emails dynamically from the contactform.php config file in my craft/config folder.

<?php

return array(
    'toEmail' => (hash('[email protected], [email protected]') ?: null),
);

This config file is not working and don't override the plugin settings in the CP. What would be the best way to achieve this ?

Source Link
Romain P.
  • 1.9k
  • 17
  • 32

P&T Contact Form plugin : how can I dynamically add email recipients inside the form config file?

I don't want to show up the email recipients in the source code. And I want to manage these emails dynamically from the contactform.php config file in my craft/config folder.

<?php

return array(
    'toEmail' => (hash('[email protected], [email protected]') ?: null),
);

This config file is not working and don't override the plugin settings in the CP. What would be the best way to achieve this ?