Alwin
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: WordPress antispambot?Great! Thank you for your help!
??
Forum: Fixing WordPress
In reply to: WordPress antispambot?I have added this code to my functions.php in my child theme:
/**
* Hide email from Spam Bots using a shortcode.
*
* @param array $atts Shortcode attributes. Not used.
* @param string $content The shortcode content. Should be an email address.
*
* @return string The obfuscated email address.
*/
function wpcodex_hide_email_shortcode( $atts , $content = null ) {
if ( ! is_email( $content ) ) {
return;
}$content = antispambot( $content );
$email_link = sprintf( ‘mailto:%s’, $content );
return sprintf( ‘%s‘, esc_url( $email_link, array( ‘mailto’ ) ), esc_html( $content ) );
}
add_shortcode( ’email’, ‘wpcodex_hide_email_shortcode’ );I have not changend anything in this code. That is correct?
Then I have added the shortcode in my wordpress text area.
Now when I look at the website page I see my email address and when I put the mouse over the email address I still see normal mailto:info@mydomain.com link under in the browser. Is that how it suposed to be?
When I look in the source code I see that my email address is indeed encoded.
Everything okay like this?
Forum: Fixing WordPress
In reply to: WordPress antispambot?Hello Stefano,
I like to do it without needing an (extra) plugin.. ??
The link you send me is the same as in my own post.
How to set it up, that is my question. First add the code to my functions.php and then use the short codes instead of my usual mailto links?
ThaNk you,
AlwinForum: Plugins
In reply to: [Calculated Fields Form] Hide minumum value calculated fieldIt worked; thank you very much ??
Forum: Plugins
In reply to: [Calculated Fields Form] Hide minumum value calculated fieldThat worked, however still 1 problem left…
The price calculation from fieldname 33 is done with the value entered in fieldnumber 87.
However, I want the price to be displayed only when fieldname 87 AND fieldname 71 are both filled in with a value!
So fieldnames 87 and 71 must be filled in both before the price calculation of fieldname 33 is displayed.
Is that also possible?
Thank you,
AlwinForum: Plugins
In reply to: [Calculated Fields Form] 3 form on 1 page not working?Of course ??
Please llok at https://www.fotoloek.nl/test/
The forms called Canvas and Chromaluxe seems to be working okay
The form called Printen is not working okay: please enter some numbers in the fields “Korte zijde foto” and “lange zijde foto” and then choose “Glans?zijdemat in the next checkbox.
Now you see the price for Glans/Zijdemat which is good, but the totalprice (Prijs totaal) is empty.
When you do the same thing on this page: https://www.fotoloek.nl/printen/
you will see that the Total price field is working fine.I don’t understand because it is the exact same form, using the same page template and of course the same form short-code.
When I delete the forms Canvas and Chromaluxe, then the Print form is working fine. So it seems that all 3 forms running on this 1 page is not possible?
Forum: Plugins
In reply to: [Calculated Fields Form] hide calculationAnd that worked again!
I hope my rather complex forms (for me) are ready now!
Thank you very much for all your great support so far! I will sure write a great review!!
Regards,
AlwinForum: Plugins
In reply to: [Calculated Fields Form] hide calculationThat worked great; thank you!
I have one more form with the same issue. I can not simply copy-paste your code in that form because the code of the calculated field is already edited like this:
(function(){
var value = fieldname2*fieldname6/100;
if(5 < value) return CEIL(value);
else return CEIL(value,0.5);
})()So how can I change this code to do the same trick as with the previous issue?
Thank you!
Regards,
AlwinForum: Plugins
In reply to: [Calculated Fields Form] values rounded upwards in 1/2 ?That worked! Thank you very much ??
Best regards,
AlwinForum: Plugins
In reply to: [Calculated Fields Form] values rounded upwards in 1/2 ?Thank you, but something is not working now:
the result of (fieldname2*fieldname6/100) is not displayed anymore in the calculated field where this new equation is active!
Maybe a little thing missing in the code you gavce me?
Forum: Plugins
In reply to: [Calculated Fields Form] Hide minimum value calculated fieldThank you, that worked!
However, I have one other equation that need the same rule:
IF(AND(100>=fieldname2,200>=fieldname6),
PREC(MAX(3.9,fieldname40*0.60+2.70),2), ‘Maximale maat 100x200cm’)So I changend it in:
IF(AND(100>=fieldname2,200>=fieldname6),
PREC(MAX(3.9,fieldname40*0.60+2.70, 0) ,2), ‘Maximale maat 100x200cm’)But that does not work…
How can i do this?
Thank you,
AlwinForum: Plugins
In reply to: [Calculated Fields Form] set between value in EquationI am sorry, but this is the first time I am doing stuff like this and I find it very difficult…
I appreciate your help very much.. ??
Yoer example: IF(AND(1<=fieldname2,fieldname2<=20), 100, 1000)
When the value is between 1 and 20 I don’t want the result to be 100 but I want to display a warning text
In other cases, when the value is greater then 20, I want to display the result of:
PREC(MAX(27.84,fieldname40*0.46+26.00),2)Can you help me with that (please…)?
Forum: Plugins
In reply to: [Calculated Fields Form] set between value in EquationThank you!
Could it be that I can do it like this:
IF(AND(>1,<20=fieldname2,to set a “between” number between 1 and 20?
Forum: Plugins
In reply to: [Calculated Fields Form] set between value in EquationThis is where I have a problem with:
IF(AND(20<=fieldname2,20<=fieldname6,20<=fieldname41,20<=fieldname42,
PREC(MAX(27.84,fieldname40*0.46+26.00),2), ‘Warning text’)So if the number of the fieldname2,fieldname6 or fieldname41 is less then 20 then the warning text should be displayed.
But the problem is that the fields2, 6 and 4 are set up with a Predefined Value of 0 (zero) which has to stay that way.
So to avoid (get around) this Predefined Value of 0 I thought that instead of this:
20<=fieldname2I would set ip up as “between 1 and 20”.
But something like “1>=fieldname2,20<=fieldname2” is not working. So is there antoher way to do this?
1>OR<20=fieldname2 or something like that?
By the way: I already asked for info about some custom coding too and I will definitely use that service! But it would be great if I could solve this issue too today ??
Forum: Plugins
In reply to: [Calculated Fields Form] Add fieldnames to EquationI will ask for custom coding service this day!
Thank you! ??