Joomla 5 Notice

We are pleased to announce that as of January 29, 2024, all of our Joomla extensions are compatible with Joomla 5.

For all who are still updateing from Joomla 3 to Joomla 4: Joomla 4 Migration instructions are available here:

There is now a separate Documentation for Visforms for Joomla 4 and for Visforms for Joomla 5!

Forum

Visforms Subscription user can ask questions in our forum. Please log in with the relevant user first.
Everybody can access the forum for reading.

Please only ask 1 question per topic.

Important information for almost every question:
V1: Which Visforms version is running?
V2: Which Joomla version is running?
V3: Which PHP version is running?

Test and calculation

More
7 years 4 months ago #4525 by GABI77
Test and calculation was created by GABI77
Hi,

I would like tested a calculation depend an other calultation. For example

FIELD 1 = 5
FIELD 2 = 6
FIELD 3 = 9
FILED 4 = 0
TOTAL = 20

IF TOTAL >= 20 THEN My amount is 15€
IF TOTAL < 20 THEN My amount is 12€

Thank you for you anwer

More
7 years 4 months ago #4526 by Administrator AV
Replied by Administrator AV on topic Test and calculation
Hi,

full documentation of all Visforms Subscription features is only available in English (and German). I'm sorry for that, but we just could not manage to provide full documentation in French. So please change to the English language of this website and check out the documentations menu then, in order to get full documentation.

vi-solutions.de/en/documentations/custom...es/documentation-cft

There are different solutions for your problem. You have to decide which one fits best for your.

1. Create a field TOTAL and a field AMOUNT, which are both of type calculation (and will both be visible in the form)
The formula in TOTAL would be
[FIELD1]+[FIELD2]+[FIELD3]+[FIELD4]+[FIELD5]
The formula in AMOUNT would be
([TOTAL] >= 20) ? 15 : 12

2. (Solution) You use only one field, a field TOTAL which is of type calculation.
The formula would be
(([FIELD1]+[FIELD2]+[FIELD3]+[FIELD4]+[FIELD5]) >= 20) ? 15 : 12

You cannot have an € character as part of the formula, You have to put the currency into the label or some custom text, just as in the demo form

vi-solutions.de/en/form-with-calculation

Regards,
Aicha

:idea: I recommend you the new and up-to-date documentation for Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/en/docs/
Most of this also applies retrospectively to Joomla 3.
Please only ask 1 question per topic :-).

:idea: Ich empfehle Dir die neue und aktuelle Dokumentation für Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/docs/
Das meiste gilt rückwirkend auch für Joomla 3.
Bitte immer nur 1 Frage pro Thema stellen :-).

More
7 years 4 months ago #4527 by GABI77
Replied by GABI77 on topic Test and calculation
Thank you so mutch

More
7 years 4 months ago #4528 by Administrator AV
Replied by Administrator AV on topic Test and calculation
You are welcome.
If it does not work as expected, please let me know.

Regards,
Aicha

:idea: I recommend you the new and up-to-date documentation for Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/en/docs/
Most of this also applies retrospectively to Joomla 3.
Please only ask 1 question per topic :-).

:idea: Ich empfehle Dir die neue und aktuelle Dokumentation für Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/docs/
Das meiste gilt rückwirkend auch für Joomla 3.
Bitte immer nur 1 Frage pro Thema stellen :-).

More
7 years 4 months ago #4529 by GABI77
Replied by GABI77 on topic Test and calculation
Hi Aicha,

I have an other problem with 'radio bouton' (I'm not sure it is the correct translation french to english).
When I tested this field in field calculation, I have an error "You can only use the following field type in calculations: Number, select, hidden and calculation. The placeholder field with name [ASSURANCE] has an invalide type"

1er field is radio bouton with 2 options, name ASSURANCE
-1- Value=1 and label "Responsabilité"
-2- Value=2 and label "Multirisque"

2ème field is calculation field
([ASSURANCE]=1) 10:20

and I have this error ==> You can only use the following field type in calculations: Number, select, hidden and calculation. The placeholder field with name [ASSURANCE] has an invalide type

Can you help me ? :)

More
7 years 4 months ago #4530 by Administrator AV
Replied by Administrator AV on topic Test and calculation
Hi,

it is exactly as stated in the error which you get, when you try to save the field of type calculation.
Not each field type can be used in calculations but only the listed one's. (Hidden, Number, Select, Checkbox and Calculation).
Fields of type radio button cannot be used in a calculation.
You have to use a field of type select instead.

Further on you have missed a "?" in your formula and if you want to check for the value 1 you need "==" instead of a single equal to.
Correct would be:
([ASSURANCE]==1) ? 10:20



Regards,
Aicha

:idea: I recommend you the new and up-to-date documentation for Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/en/docs/
Most of this also applies retrospectively to Joomla 3.
Please only ask 1 question per topic :-).

:idea: Ich empfehle Dir die neue und aktuelle Dokumentation für Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/docs/
Das meiste gilt rückwirkend auch für Joomla 3.
Bitte immer nur 1 Frage pro Thema stellen :-).

Moderators: Administrator AVAdministrator IV
Powered by Kunena Forum