hello i use thanks page to display result like {fieldname}
but how to don't display a value if nothing was checked ?
ex : if i use a radio button and nothing check in form it display {fieldname}
... it will be good that doesn't display ..
thanks for your help
but how to don't display a value if nothing was checked ?
ex : if i use a radio button and nothing check in form it display {fieldname}
... it will be good that doesn't display ..
thanks for your help
Hi micker,
It sounds easy, try something like this (example for user name)
To see how to get your fields, set a debuger action onSubmit, there it will show the object form😉
hope it help you,
Cya,
BN
It sounds easy, try something like this (example for user name)
$name = "'{$form->data['_PLUGINS_']['joomla_registration']['name']}'";
if($name!="" && $name!==Null && $name!=0) echo $name;
To see how to get your fields, set a debuger action onSubmit, there it will show the object form😉
hope it help you,
Cya,
BN
ex :
i my case
fibroblastes_sourcil2rides (field name)
do you think is good ?
i my case
fibroblastes_sourcil2rides (field name)
$fibro= $form->data['fibroblastes_sourcil2rides'];
if($fibro!="" && $fibro!==Null && $fibro!=0) echo $fibro;
do you think is good ?
Hi micker,
Are you using a direct application, do not know if you will get fetch the data because the variables of the form data can be within another array. Places an Action Debugger (on the Basic tab) on the Submit event, and puts the result here, this will help me to help you build the path to the variables.
BN
Are you using a direct application, do not know if you will get fetch the data because the variables of the form data can be within another array. Places an Action Debugger (on the Basic tab) on the Submit event, and puts the result here, this will help me to help you build the path to the variables.
BN
Array
(
[option] => com_chronoforms5
[chronoform] => diagnosticfonctionnel
[event] => submit
[question_peau] => trouble pigmentation
[oxydation_fume] => Non
[oxydation_verre] => - de 2 verres
[oxydation_soleil] => Oui
[oxydation_stress] => Non
[oxydation_couche] => Non
[oxydation_sport] => Non
[oxydation_final] => 0
[fibroblastes_sourcil2rides] => Non
[fibroblastes_sourcil] => Oui
[fibroblastes_sourire2rides] => Oui
[fibroblastes_sourireplus2rides] => Oui
[fibroblastes_sourirerides] => Oui
[fibroblastes_couferme] => Oui
[fibroblastes_coupeurelache] => Oui
[fibroblastes_coutresrelache] => Non
[fibroblastes_final] => 1
[inflammatoire_peau] => Non
[inflammatoire_rougeurs] => Non
[inflammatoire_peausensible] => Oui
[inflammatoire_final] => 2
[barriere_cutanee_peau] => Oui
[barriere_cutanee_creme] => Oui
[barriere_cutanee_hiver] => Non
[barriere_cutanee_final] => 0
[kerastisation_kystes] => Non
[kerastisation_final] => 0
[hyperseborhee_reveil] => Oui
[hyperseborhee_toillette] => Non
[hyperseborhee_gras] => Non
[hyperseborhee_gras_ete] => Non
[hyperseborhee_final] => 0
[pigmentaire_taches] => Non
[pigmentaire_masque] => Non
[pigmentaire_final] => 1
[flore_acne] => Non
[flore_final] => 1
[button3] => Envoyer
[id] => 27
)
thanks
i want to do it for all results ... lol
Hi micker,
Your field is a string or a boolean?
If it is a boolean, i belive that your code is right
If it is just a string, then I sugest use this:
You can do it, this works in every field.😉
Hope it help you🙂
BN
Your field is a string or a boolean?
If it is a boolean, i belive that your code is right
$fibro= $form->data['fibroblastes_sourcil2rides'];
If it is just a string, then I sugest use this:
$fibro= "'{$form->data['fibroblastes_sourcil2rides']}'";
You can do it, this works in every field.😉
Hope it help you🙂
BN
1 i insert custom code before submitting button
2 insert this code for testing
3 in my thanks message i insert {oxydation_fume1} for display
but doesn't work
thaht the good way ?
2 insert this code for testing
$oxydation_fume1= "'{$form->data['oxydation_fume']}'";
if($oxydation_fume1!="" && $oxydation_fume1!==Null && $oxydation_fume1!=0) echo 'texte fibro'.$oxydation_fume1;
3 in my thanks message i insert {oxydation_fume1} for display
but doesn't work
thaht the good way ?
In your Thanks message insert:
This is PHP code, don't forget the tags, and it is to insert it in your thanks message, not in a custom code😉
BN
<?php
$oxydation_fume1= "'{$form->data['oxydation_fume']}'";
if($oxydation_fume1!="" && $oxydation_fume1!==Null && $oxydation_fume1!=0) echo 'texte fibro'.$oxydation_fume1;
?>
This is PHP code, don't forget the tags, and it is to insert it in your thanks message, not in a custom code😉
BN
strange .... when i save submit form that display
Thanks you very much for your help !!
data['oxydation_fume']}'"; if($oxydation_fume1!="" && $oxydation_fume1!==Null && $oxydation_fume1!=0) echo 'texte fibro'.$oxydation_fume1; ?> => php not execute
Thanks you very much for your help !!
at first the original message and at end the code for testing
<h2>Vos résultats :</h2>
<p>Une peau du visage peut avoir 8 sortes de problèmes ou « dysfonctions » : {question_peau}</p>
<h3>JAUNE = RECHERCHE DU STRESS OXYDATIF</h3>
<p>1/ Je fume : {oxydation_fume}<br />2/ Je bois plus de deux verres d’alcool par jour: {oxydation_verre}<br />3/ Je m’expose au soleil souvent sans protection: {oxydation_soleil}<br />4/ Je me sens surmené(e), stressé(e){oxydation_stress}<br />5/ Je me couche souvent tard: {oxydation_couche}<br />6/ Je suis un(e) grand(e) sportif (ve) (plus de 5h par semaine)(plus de 5h par semaine) : {oxydation_sport}<br /> 7/ J’estime mon stress oxydatif à :<br /><img src="images/result-{oxydation_final}.png" alt="" />
</p>
<h3>ROSE = RECHERCHE DE PERTE DE VOLUME ET DE RELACHEMENT</h3>
<p>1/ Votre front a :<br />- deux rides quand vous haussez les sourcils : {fibroblastes_sourcil2rides}<br />- plus de deux rides quand vous haussez les sourcils : {fibroblastes_sourcilplus2rides}<br />- des rides sans hausser les sourcils : {fibroblastes_sourcil}<br />2/ Vos yeux ont :<br />- une à deux rides quand vous souriez : {fibroblastes_sourire2rides}<br />- plus de deux rides quand vous souriez : {fibroblastes_sourireplus2rides}<br />- des rides même quand vous ne souriez pas : {fibroblastes_sourirerides}<br />3/ Votre cou est :<br />- ferme et ne se relâche pas : {fibroblastes_couferme}<br />- un peu relâché : {fibroblastes_coupeurelache}<br />- très relâché : {fibroblastes_coutresrelache}<br />4/ J’estime ma perte de volume et relâchement à :<br /><img src="images/result-{fibroblastes_final}.png" alt="" />
</p>
<h3>ROUGE = RECHERCHE DE PEAU ENFLAMMÉE (ROUGEURS)</h3>
<p>1/ J’ai souvent la peau qui rougit, qui picote, qui chauffe: {inflammatoire_peau}<br />2/ J’ai noté des rougeurs sur mon visage: {inflammatoire_rougeurs}<br />3/ J’ai la peau sensible, je supporte difficilement les crèmes, souvent ça me fait des réactions : {inflammatoire_peausensible}<br />4/ J’estime l’état inflammatoire de ma peau à :<br /><img src="images/result-{inflammatoire_final}.png" alt="" />
</p>
<h3>BLEU = RECHERCHE DE PEAU SÈCHE (TROUBLE DE LA BARRIÈRE CUTANÉE)</h3>
<p>1/ En l’absence de soins j’ai la peau sèche : si je ne mets pas de crème ma peau du visage tire: {barriere_cutanee_peau}<br />2/ J’ai la peau sèche mais l’hydrater une fois par jour suffit: {barriere_cutanee_creme}<br />3/ Ma peau du visage est tellement sèche, que je suis obligé(e) de l’hydrater matin et soir : {barriere_cutanee_hydratation}<br />4/ Je n’ai pas la peau sèche, sauf, en hiver: {barriere_cutanee_hiver}<br /> 5/ J’estime la sécheresse de la peau de mon visage à : <br /><img src="images/result-{barriere_cutanee_final}.png" alt="" />
</p>
<h3>GRIS = RECHERCHE DE PEAU ÉPAISSE (KÉRATINISATION)</h3>
<p>1/ Je sens des kystes sous la peau du visage, comme des boutons : {kerastisation_kystes}<br />2/ J’ai des points noirs: {kerastisation_pointnoir}<br />3/ Je sens des épaisseurs ou des rugosités comme des reliefs sur la peau: {kerastisation_epaisseurs}<br /> 4/ J’estime la kératinisation de la peau de mon visage à : <br /><img src="images/result-{kerastisation_final}.png" alt="" />
</p>
<h3>ORANGE = RECHERCHE DE PEAU GRASSE (HYPERSÉBORRHÉE))</h3>
<p>1/ Le matin au réveil, quand je passe la main sur le nez, le front ou les tempes, il reste une trace de gras sur les doigts : {hyperseborhee_reveil} <br />2/ Oui, ma peau est un peu grasse le matin au lever, mais après la toilette, ce n’est plus le cas: {hyperseborhee_toillette} <br />3/ Elle est tellement grasse, que je suis obligé(e) de m’éponger vers midi, voire plus souvent dans la journée: {hyperseborhee_gras}<br />4/ Je n’ai pas la peau grasse sauf en été {hyperseborhee_gras_ete}<br />5/ J’estime mon hyperséborrhée ou peau grasse à : <br /><img src="images/result-{hyperseborhee_final}.png" alt="" />
</p>
<h3>BRUN = RECHERCHE DES TACHES PIGMENTAIRES</h3>
<p>1/ J’ai des taches : {pigmentaire_taches}<br />2/ J’ai / j’ai eu un « masque de grossesse »: {pigmentaire_masque}<br />3/ Après un bouton, ou une brûlure, ou une petite plaie, j’ai la peau qui marque brun, et ça reste longtemps brun, alors que le bouton/brûlure /plaie a disparu depuis longtemps: {pigmentaire_brun}<br />4/ Je ne fais pas souvent des boutons d’acné, juste un ou deux par mois, mais leurs taches brunes restent longtemps !: {pigmentaire_acne}<br /> 5/ J’estime mes taches pigmentaires à : <br /><img src="images/result-{pigmentaire_final}.png" alt="" />
</p>
<h3>VERT = RECHERCHE DE TROUBLE DE LA FLORE CUTANÉE (BOUTONS)</h3>
<p>1/ Je fais souvent des boutons comme de l’acné (blanc crémeux) : {flore_acne}<br /> 2/ J’estime mon trouble de la flore cutanée à : <br /><img src="images/result-{flore_final}.png" alt="" />
</p>
<p>Â </p>
<?php $oxydation_fume1= "'{$form->data['oxydation_fume']}'";
if($oxydation_fume1!="" && $oxydation_fume1!==Null && $oxydation_fume1!=0) echo 'texte fibro'.$oxydation_fume1; ?>
Hi micker,
That's stange, The code looks fine, the CF5 tags and the php.
Set a custom code action, after the thanks mensage with the php code, and then please tell me the result.
BN
That's stange, The code looks fine, the CF5 tags and the php.
Set a custom code action, after the thanks mensage with the php code, and then please tell me the result.
<?php $oxydation_fume1= "'{$form->data['oxydation_fume']}'";
if($oxydation_fume1!="" && $oxydation_fume1!==Null && $oxydation_fume1!=0) echo 'texte fibro'.$oxydation_fume1; ?>
BN
same thing ...
that display
that display
data['oxydation_fume']}'"; if($oxydation_fume1!="" && $oxydation_fume1!==Null && $oxydation_fume1!=0) echo 'texte fibro'.$oxydation_fume1; ?>
Hi micker,
Should happen some error, please set the error reporting to maximum to get it.
BN
Should happen some error, please set the error reporting to maximum to get it.
BN
Hi micker,
I saw that in your "question_peau" field you have some values with spaces, try not give spaces😉
Ok, now relative to the problem, probably the thanks message can't handle php code, I set all your message to a costum field and it worked😉
I changed a litle the code that I gave you, here an exemple running in your form
Now, the line only appers if oxydation_fume is filled, if you want to allways it appers with an default value, it's simple:
Hope it now help's you😉
BN
I saw that in your "question_peau" field you have some values with spaces, try not give spaces😉
Ok, now relative to the problem, probably the thanks message can't handle php code, I set all your message to a costum field and it worked😉
I changed a litle the code that I gave you, here an exemple running in your form
<?php
$oxydation_fume1= "".$form->data['oxydation_fume']."";
if($oxydation_fume1!="" && $oxydation_fume1!==Null)
{
echo "<p>1/ Je fume : $oxydation_fume1<br />";
}; ?>
Now, the line only appers if oxydation_fume is filled, if you want to allways it appers with an default value, it's simple:
<?php
$oxydation_fume1= "".$form->data['oxydation_fume']."";
if($oxydation_fume1!="" && $oxydation_fume1!==Null)
{
echo "<p>1/ Je fume : $oxydation_fume1<br />";
} else
{
echo "<p>1/ Je fume : Je préfère ne pas répondre<br />";
} ?>
Hope it now help's you😉
BN
Hi micker,
I'm glad it worked 😀
Do not forget to close the topic. So, who has the same problem will see that is already solved and can search the solution here😉
Cya
BN
I'm glad it worked 😀
Do not forget to close the topic. So, who has the same problem will see that is already solved and can search the solution here😉
Cya
BN
This topic is locked and no more replies can be posted.
