Hello I’m calculating the date of birth. It prints the result to the cell. But it does not write to the result section that comes with html. What could be the problem?
(function(){
var o = DATEDIFF(NOW(), fieldname19, 'dd-mm-yyyy', 'y');
return o['years']+' Y?l'+ o['months']+' Ay'+ o['days']+' Gün';
jQuery('#calculation-yashesaplama').html(yashesaplama);
return yashesaplama;
})()
Thank you very much for using our plugin. The “return” instruction stops the evaluation of the equation and returns the result. Please, edit the equation as follows:
(function(){
var o = DATEDIFF(NOW(), fieldname19, 'dd-mm-yyyy', 'y'),
yashesaplama = o['years']+' Y?l'+ o['months']+' Ay'+ o['days']+' Gün';
jQuery('#calculation-yashesaplama').html(yashesaplama);
return yashesaplama;
})()
The date calendar “dd/mm/yyyy” sounds in English. Can we do this in Turkish? Can we at least remove the “dd/mm/yyyy” part above the date cell if it doesn’t come automatically above the cell? thanks
The WEEKDAYNAME returns the weekday name directly. So, you should use o directly instead of o['days']. Also, if you want to get the weekday name in Turkish, you must pass the locate (tr-TR) as the third parameter in the WEEKDAYNAME operation:
(function(){
var o = WEEKDAYNAME(fieldname20,'dd/mm/yyyy', 'tr-TR');
yashesaplama2 = o+' Gün';
jQuery('#calculation-yashesaplama2').html(yashesaplama2);
return yashesaplama2;
})()
Q: The date field is displayed to the user with the current date. Can we replace this with a custom date?
A: Yes, of course, that’s possible. The Date fields include two attributes to enter the default date.
“Default Date” allows you to enter a date directly with the same format selected via the “Date Format” attribute (Ex. 28/01/2023) or a relative date like X days, months, and years after or before today (Ex. +7m +1d).
“Predefined Value” is similar to the previous one. It allows you to enter a date directly or a field’s name to display the date of another field.
Another difference with the “Default Date” attribute is that you can use the “Predefined Value” to enter the field placeholder instead of the default value.
If you want to display the field’s value empty, leave empty the “Predefined Value” attribute and tick the “Use predefined value as placeholder” checkbox.
Q: Where do we mark the required field that the user must fill?
A: Tick the “Required” checkbox in the fields’ settings (The attribute is present in every entry field).
Q: Our last question is, is there a method to make the date field like this?
A: I’m sorry. You must emulate the date field with three separate controls.
You can insert a DIV field in the form and select “3 Columns” through its settings. Insert three controls into the DIV field: A Number field configured to accept digits only, with the value 1, and 31 as the min and max attributes, a DropDown field for months with numbers as the choices’ values, and the months’ names as choices’ texts, and another number field for years.
In this case, to use the date for calculation, you must concatenate the components:
(function(){
var d = CONCATENTATE(fieldname1, '/', fieldname2, '/', fieldname3);
return DATEDIFF(TODAY(), d, 'dd/mm/yyyy', 'd')['days'];
})()
The equation above concatenates the date components and returns the number of days between today and the date entered by the user.
Hello, What could be wrong with this code? Actually it works without Criterion. However, if the criterion is A, we calculate it in the lower part, and if it is B, we calculate it as a function under B. But it doesn’t print the result. Thanks.
The equation structure is correct, but I don’t know the fields’ values. So, I cannot know if the fields’ values satisfy the conditions without checking the form in action.
Hello, the equation at the bottom of the form is actually correct, but it does not write the result. This equation does not work while functions work in all our other calculations.
Actually, when I remove the criteria of the equation, it works fine as one. What could it be?