[Solved]yes/no plugin

thanks but it does'nt work

$plouf = '{fiche_user___parti_raw}';
<?php if ($plouf == 1): ?>
NOT
<?php else: ?>
Yes
<?php endif ?>

the data is not a number or a letter.
 
As @juuser mentioned, it depends at which place you want to access the value.

E.g. in a calc field you simple have to enter:
return '{fiche_user___parti_raw}';​
to get 1 or 0

or
return '{fiche_user___part}';​
to get the label value (yes/no)

the data is not a number or a letter
what else? A string?
 
As @juuser mentioned, it depends at which place you want to access the value.

E.g. in a calc field you simple have to enter:
return '{fiche_user___parti_raw}';​
to get 1 or 0

or
return '{fiche_user___part}';​
to get the label value (yes/no)

what else? A string?


in the DB there is an (int) for this plugin but if I put the variable with $plouf = '{fiche_user___parti_raw}' I see 0 or 1 with echo $plouf but it is never taken into account. that's what I don't understand
in the if condition the data is neither a number nor a letter but apparently just a state whatever the test. It's incomprehensible
 
What and where (calc element, form php-plugin etc) are you trying to do? At least your PHP- code above looks strange.
 
Last edited:
What and where (calc element, form php-plugin etc) are you trying to do? At least your code above is not a working PHP-code.
I use Yes/No plugin to manage user records. If the user has left, I want to display "utilisateur parti" in the form details to get the information, via a custom template.
everything works fine except that the condition doesn't display the right information
 
I'm still not sure where do you have your code. Is it in your custom template's default.php file or somewhere else?

And you want to display some text in your form depending on the "yesno" element value?
 
I'm still not sure where do you have your code. Is it in your custom template's default.php file or somewhere else?

And you want to display some text in your form depending on the "yesno" element value?

Yes, I duplicate the detail template, and modify the default.php for displaying text in my form depending on the "yesno" element value
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top