hi, is possible to set the destination of the email based on a select?
sorry for my english i'll try to explain better:
i want to manage several contacts in same form: director, secretary, tech support..
i just want a select with those options and send the email to the correct department
ps: nice the new forum interface ๐
sorry for my english i'll try to explain better:
i want to manage several contacts in same form: director, secretary, tech support..
i just want a select with those options and send the email to the correct department
ps: nice the new forum interface ๐
thanks a lot, as always๐
the dropdown name should be recipients or mail_to_use?
the dropdown name should be recipients or mail_to_use?
ok now works.
another little thing:
there is a way to check if the user is logged and lock the email field with the email of the user?
another little thing:
there is a way to check if the user is logged and lock the email field with the email of the user?
Hi alfredopacino,
You can name the variables what ever you like. You just need to make sure that they match up where they need to. So, you can replace 'recipients' with the name of a checkbox group of drop-down from your form; and you can replace 'mail_to-use' with something else provided that you then use that in the Email action.
Please see this FAQ for getting the User email.
Bob
You can name the variables what ever you like. You just need to make sure that they match up where they need to. So, you can replace 'recipients' with the name of a checkbox group of drop-down from your form; and you can replace 'mail_to-use' with something else provided that you then use that in the Email action.
Please see this FAQ for getting the User email.
Bob
thanks.
just a last thing: getting the user info works, but how can i "lock" the text field already filled?
just a last thing: getting the user info works, but how can i "lock" the text field already filled?
Hi alfredopacino,
You can use a text input and set it to ReadOnly (Please see this FAQ ).
Or better use a Custom Element element and just display e.g. the username
Bob
You can use a text input and set it to ReadOnly (Please see this FAQ ).
Or better use a Custom Element element and just display e.g. the username
<?php
// code to get user info goes here
?>
<p>Username: <?php echo $user->username; ?></p>
Bob
i tried this in custom code
why it doesnt work? :/
if(isset($user->username))
echo "<script>document.getElementById("name").disabled=true</script>";
why it doesnt work? :/
this too
if(isset($user->username))
echo "<script>document.getElementById('name').readonly='readonly'</script>";
Hi alfredpacino,
I think that the problem is that the script snippet that you have runs as soon as it is loaded and that may be before the form is loaded. Please try putting this in a Load JS action in your form
Bob
I think that the problem is that the script snippet that you have runs as soon as it is loaded and that may be before the form is loaded. Please try putting this in a Load JS action in your form
window.addEvent('domready', function() {
$('name').readonly = true;
}
Bob
i tried this
(there's some jquery conflict i cant use jquery selector)
doesn't work too ๐ฒ
window.addEvent('domready', function() {
document.getElementById('name').readonly=true});
(there's some jquery conflict i cant use jquery selector)
doesn't work too ๐ฒ
This topic is locked and no more replies can be posted.