Bienvenido, Invitado
Recordarme

TEMA:

Setting conditional default values for textfields 5 años 1 mes antes #179192

  • Autor del tema
  • sonstephen0
  • Fuera de línea
  • Fresh Breezer
  • Fresh Breezer
  • Mensajes: 3
  • Gracias recibidas: 0
How do I set conditional default values for textfield elements? I am working on a form in which a user can order a hot tub cover. The user selects a brand and then model. After selecting the model, dimensions for the model will appear. The dimensions will be default values inside of a textfield. Due to some variations in the spa models, the dimensions may not be correct so the user can correct the dimensions by typing in the correct value.

Here is a link to the form: www.spapalace.com/spa-cover-order-form

The important part is in step 2 in the dimesions section.

I tried using this code for the default values but it doesn't seem to work.

<?php
if ($jacuzzi_model=="j_325") {
return '84';
} elseif ($jacuzzi_model=="j_335") {
return '88';
} else {
return 'unselected';
}
?>

What am I doing wrong? Thanks.

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

Setting conditional default values for textfields 5 años 1 mes antes #179232

  • Avatar de lovre
  • lovre
  • Fuera de línea
  • Usuario está bloqueado
  • Usuario está bloqueado
  • Mensajes: 2667
  • Karma: 76
  • Gracias recibidas: 329
Hi,

can you please send us your form so we can test it. Follow this steps to create a Form Pacakge:
crosstec.org/en/support/online-documenta...ted/94-packages.html

Zip it (.zip) and attach here.
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!
===========================================
Need to renew Pro Support?
Buy Here!
===========================================
Satisfied?
Consider a membership!
===========================================
Like us on Facebook
===========================================

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

Última Edición: Post by lovre.

Setting conditional default values for textfields 5 años 1 mes antes #179271

  • Autor del tema
  • sonstephen0
  • Fuera de línea
  • Fresh Breezer
  • Fresh Breezer
  • Mensajes: 3
  • Gracias recibidas: 0
Ok, here is my form package.
Adjuntos:

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

Última Edición: Post by sonstephen0.

Setting conditional default values for textfields 5 años 1 mes antes #179312

  • Avatar de lovre
  • lovre
  • Fuera de línea
  • Usuario está bloqueado
  • Usuario está bloqueado
  • Mensajes: 2667
  • Karma: 76
  • Gracias recibidas: 329
Hi,

We are sending you back your form in a package. Just download the package, unzip and install via the package installer (BF> Configuration).

What we have done is removed the php code from the value field of the dimension_a field and created a "Change" Actionscript for your jacuzzi_model field (jacuzzi_model> Advanced> Actionscript> Custom> Check Change). The script looks like this:
function ff_jacuzzi_model_action(element, action)
{
if (element.value=="j_325")
{ff_getElementByName('dimension_a').value="84";}
else if (element.value=="j_335")
{ff_getElementByName('dimension_a').value="88";}
}

You can now add the rest of the model dimensions simply by adding more else if statements.
You should also do a similar change actionscript for your sundance_spas_model and strong_spas_model elements.

Hope this helps. Let us know if this is what you were talking about.
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!
===========================================
Need to renew Pro Support?
Buy Here!
===========================================
Satisfied?
Consider a membership!
===========================================
Like us on Facebook
===========================================
Adjuntos:
El siguiente usuario dijo gracias: sonstephen0

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

Setting conditional default values for textfields 5 años 1 mes antes #179358

  • Autor del tema
  • sonstephen0
  • Fuera de línea
  • Fresh Breezer
  • Fresh Breezer
  • Mensajes: 3
  • Gracias recibidas: 0
Thank you for the help. I installed the package and added the rest of the models. Everything is working. Thank you.

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

Setting conditional default values for textfields 5 años 1 mes antes #179367

  • Avatar de lovre
  • lovre
  • Fuera de línea
  • Usuario está bloqueado
  • Usuario está bloqueado
  • Mensajes: 2667
  • Karma: 76
  • Gracias recibidas: 329
That's great.

Let us know if you need further assistance.
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!
===========================================
Need to renew Pro Support?
Buy Here!
===========================================
Satisfied?
Consider a membership!
===========================================
Like us on Facebook
===========================================

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

Última Edición: Post by lovre.
  • Página:
  • 1
Tiempo de carga de la página: 0.058 segundos