Bienvenido, Invitado
Recordarme

TEMA:

Email (to multiple users?) based on radio button 8 años 9 meses antes #97868

  • Autor del tema
  • DavidBoggitt
  • Fuera de línea
  • Junior Breezer
  • Junior Breezer
  • Mensajes: 54
  • Gracias recibidas: 1
Hi,

I'm more than happy to have a go at this if someone can point me to a resource/tutorial.

As per the subject, I'm wondering if it's possible to send the form contents (to multiple users?) based on a radio button choice?

Many thanks,

Dave.

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Email (to multiple users?) based on radio button 8 años 9 meses antes #97975

  • lennerd
  • Fuera de línea
  • Developer
  • Developer
  • Mensajes: 4669
  • Karma: 72
  • Gracias recibidas: 411
Hello Dave,

this sounds possible but will need some custom coding.

Basically it works like explained here:

crosstec.org/support/index.php?pid=knowl...viewentclient&id=133

The imposrtant part is to fetch the value with:

ff_getSubmit('fieldname');

and then you need an if branch to check for the value and send the emails according to this value like:

$myradiovalue=ff_getSubmit('fieldname');

if($myradiovalue=="somevalue"){
$this->sendMail($from, $fromname, "my@email.com", $subject, $body); // This line actually emails the form.
}
if($myradiovalue=="someothervalue"){
$this->sendMail($from, $fromname, "mysecond@email.com", $subject, $body); // This line actually emails the form.
}


I hope this helps.
Regards,
Stefan

===============================================
Satisfied? Consider a membership!
===============================================
Like us on Facebook
===============================================
Follow us on Twitter
===============================================

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Email (to multiple users?) based on radio button 8 meses 3 semanas antes #262926

the link from the previous comment doesn't work (404).
where do i need to write this php code?

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Email (to multiple users?) based on radio button 8 meses 3 semanas antes #262927

  • Avatar de Mirec
  • Mirec
  • Fuera de línea
  • Ultimate Breezer
  • Ultimate Breezer
  • Mensajes: 2498
  • Karma: 2
  • Gracias recibidas: 135
Hi,

you can put in code in Advanced of form -> More option->Submit pieces->End submits and select type custom and inserts code into below box.

Regards,
Mirko

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Email (to multiple users?) based on radio button 8 meses 3 semanas antes #262928

thank you for quick reply
I got an error:
Call to undefined function ff_getSubmit()

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Email (to multiple users?) based on radio button 8 meses 3 semanas antes #262929

  • Avatar de Mirec
  • Mirec
  • Fuera de línea
  • Ultimate Breezer
  • Ultimate Breezer
  • Mensajes: 2498
  • Karma: 2
  • Gracias recibidas: 135
Hi,

try put this line code on top of function:
$this->execPieceByName('ff_InitLib');

it should be looks like this:
$this->execPieceByName('ff_InitLib');

$myradiovalue=ff_getSubmit('fieldname');

if($myradiovalue=="somevalue"){
$this->sendMail($from, $fromname, "my@email.com", $subject, $body); // This line actually emails the form.
}
if($myradiovalue=="someothervalue"){
$this->sendMail($from, $fromname, "mysecond@email.com", $subject, $body); // This line actually emails the form.
}

Regards,
Mirko

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Última Edición: Post by Mirec.
Moderadores: ForumSupport
Tiempo de carga de la página: 0.059 segundos