• Fabrik V4.4.1 is now available.

    This version corrects the Admin issue introduced by V4.4. V4.4.1 is available through the Joomla Updater or for download through your My Downloads area of our website.

    Turns out a code change intended for our 5.0dev branch inadvertantly got pushed to the 4.x branch (by me, duh!). The javascript structure in 5.0 will change considerably and part of that change took effect with the inadvertant code change.

    We have reverted the code change and released 4.4.1. V4.4 has been retracted.

    Sorry for any inconvenience.

  • A new version of Full Calendar is now available.

    See the details here

build a questionnaire

cap

Member
Hello i need to do a simple task
I have a questionnaire with several questions. Each questions can have as answer "YES" or "NO"
According to the answer, there is another field that assume a value
if yes the field is E, if NO the field is NE
Some questions have another field that have another similar formula, but this time from the 2nd field
I ll need to have all the questionnaire which i can query and filter from name or from one of the questions.
It should not be difficult
But my first stop is how to assign a value to afield according to another fiedl value?
i am trying to set a field element and use an expression like
if "lista_haart" like "YES" then E
but of course don't work
thanks for help
 
Last edited:
i have downloaded amd installed buy i don't see where is

ok i was not enabled..
where do i edit ?i use the element as calc..and what shall i do afer?i mean it seems it need code..i don't know what to write
 
following the help i come to this code i put in "calculation code"

return (int)'{lista___lista___haart}'

where lista is the name of database table, and lista___haart is the name of the element with radiobox but i get error
it can't work anyway as the radiobox is YES or NO, but i need to ouyput E or NE
 
Assuming the values (not labels) of your radio element are "yes" and "no", it should be:
PHP:
$radioelement = '{tablename___radioelementname_raw}';

if ($radioelement == 'yes') {
   return 'E';
} else {
   return 'NE';
}
 
Ok i ll try tomorrow
What is theradioelementname_raw, what raw stand for?
The element is called lista___hart at least is what i see in the element area

I forgot: the radiobox don t have a default value, but undprcified. So when is still neither yes or no, i must have blank for return. How do i put this?
 
_raw means that it uses the value of your radio element, not label.

And yes, you need to change the placeholder (tablename/elementname) to match yours.

I recommend you to read Fabrik wiki as there is almost everything you need with sample code snippets. And for generic PHP, Stackoverflow and ChatGPT are very good resources. It will make your life a lot easier.
 
Last edited:
hello
alleluia i become mad but eventually i did it
iwas usinthe variable $radiobutton which i shoukldn't...when i gaveanewname it works!7
but there are 2 issue now
if YES = E
if NO =NE
if no choica made =blank
Now i akways have NE if i dont choose YES
ANother issue, the fielld don't get automatically updated. It is correctly save but when i open the form it is always on NE, and if change to YES remain to NE
 
i was able to use the code for the proper choices..still i need to have the update, and this is somehting i haveno clue

btw..so i can use gtp, really?but how to question?what would you ask for this case, update?
 

Members online

No members online now.
Back
Top