Skip Navigation

[Resuelto] Empty Numeric Fields not allowed even on non-required fields

This support ticket is created hace 4 años, 8 meses. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 1 respuesta, has 2 mensajes.

Last updated by Minesh hace 4 años, 8 meses.

Assisted by: Minesh.

Autor
Mensajes
#1307337

With a types number-field a post containing the field cannot be saved even though it is not a required field. Also, zero, a number, is not permitted unless it includes a decimal point (e.g. 0.0 would be permitted). Is this intentional?
Also,
I'm using mathematical calculations native to PHP using the plugin code described in this post: https://toolset.com/forums/topic/math-with-custom-fields-values/
Works as expected except that when a number-field is empty that is used in a calculation in the plugin a parse error occurs which prohibits displaying the page front end and prohibits opening it in Admin.
I am not a PHP coder. Is there a simple way the PHP code can be modifed so as not to create the parse error with an empty field?
OR does this parse error relate to this issue where a number field cannot be empty? Thanks.

ALSO, when I open a support ticket I no longer have the ability to chat nor submit a standard ticket as in the past. I only get the option to "REPORT AN ISSUE" regardless of the nature of the ticket. Why is that?

#1307495

Minesh
Supporter

Languages: Inglés (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I look like I understand why you get the fatal error when you are using the code. Because the code you are using is having division formula. So if the field is having zero, you should not divide with zero value. That code needs bit adjustment when you having zero with field value.

If you can share access details and problem URL and tell me where exactly you added the code I will try to fix this for you.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.