hotcore
Forum Replies Created
-
Forum: Plugins
In reply to: [Gutenberg] All page updates failHi, if I get some spare time, I’ll check if a plug-in is causing this.
Thx!Hi,
thanks for your offer to help!
I solved the issue by placing the code to check some dependent fields in a calculated field. That works fine 😉
Since I’m not used to Javascript I spent quite some time in the trap:
if (var = value) …
That is a quite some nasty “feature” of Javascript…
However, my first form is now succesfully completed.
Thnk you very much for all the help!
Bye,
ArieForum: Plugins
In reply to: [Calculated Fields Form] Define extra Javascript functionsSupplementary question:
I wanted to add this function:
function norm(cd, v2, kd, f){
var rc = 0;
var yd = 0;
if (f != 0) {
yd = FLOOR(ABS(cd – f) / 365);
if (yd > 17) {rc = rc + v2;} else {rc = rc + kd;};
}
return rc;
}So, I created a norm.js file in the public js directory as described in the FAQ, but it does not work.
In the predefined .js files there is a special syntax. Do I need that? Is it described somewhere?
Thanks very much for the help. Hope i’ll get the hang of it soon.
Best, Arie
Forum: Plugins
In reply to: [Calculated Fields Form] How check correctness of a date?Thank you *very* much!
Forum: Plugins
In reply to: [Calculated Fields Form] How check correctness of a date?Hi,
i defined a field as a “date time” field.
Max date = 0 (current date).
Year range -110:+0.
Dropdown active.
Include time is off.I see that dates internally are number of days, am i right?
I tried the datediff function this way in order to get the number of years between current date and the date from the field:
window.alert(DATEDIFF(NOW(),fieldname30, ‘dd/mm/yyyy’, ‘y’)[‘years’]);
But i think this chokes the interpreter.(Got that from webpage: http://wordpress.dwbooster.com/faq/calculated-fields-form#q217)
Please help.
TIA,
ArieForum: Plugins
In reply to: [Calculated Fields Form] Javascript error??Hi,
of course. My bad. Thx!Forum: Plugins
In reply to: [Calculated Fields Form] Columns don't display rightAh, I interpreted the columny as an instruction to put field x in column number y.
Maybe a lot of people have trouble with interpreting that. Maybe a little more explanation in the help!
Thank you *very* much!
Forum: Plugins
In reply to: [Calculated Fields Form] Columns don't display rightI just found out that it works when I use column2 with the field in column 1, as if you specify where to continue after this field.
Thanks Colinsp! I will do.