Hi Chrono-Team🙂
According to this topic: http://www.chronoengine.com/forums/posts/f2/t96375/don-t-send-empty-field.html i have 2 questions:
Is it possible to hide all empty fields in the email with a shorter php code? I created a big form and i dont want to edit every line. that would cost too much time😟
the way u descripted it in the linked topic above works fine but i got this when i try to use this on check boxes:
array ( 0 => 'value', )
no doubt u have some great ideas😉
Best regards
Robert
According to this topic: http://www.chronoengine.com/forums/posts/f2/t96375/don-t-send-empty-field.html i have 2 questions:
Is it possible to hide all empty fields in the email with a shorter php code? I created a big form and i dont want to edit every line. that would cost too much time😟
the way u descripted it in the linked topic above works fine but i got this when i try to use this on check boxes:
array ( 0 => 'value', )
no doubt u have some great ideas😉
Best regards
Robert
Hi Robert,
a. No - ChronoForms has no way of knowing which lines you want to include and which to skip. You can possibly use a PHP loop to simplify the code.
b. Please drag a Handle Arrays action into the OnSubmit event and move it up before the Custom Code action.
Bob
a. No - ChronoForms has no way of knowing which lines you want to include and which to skip. You can possibly use a PHP loop to simplify the code.
b. Please drag a Handle Arrays action into the OnSubmit event and move it up before the Custom Code action.
Bob
Hi GreyHead, thanks for answer!
As a designer my php skills are not that good😟
This code works fine for hiding empty textfields in the email:
But when wrap this code around a checkbox field it results into this output in the email:
array ( 0 => 'value01', 1 => 'value02', )
Could u please provide me the handle array you talk about into the submit button to avoid this? i have no clou how to do this :/
Thank u so far🙂
As a designer my php skills are not that good😟
This code works fine for hiding empty textfields in the email:
<?php if(!empty($form->data["fieldname01"])): ?>
Label: {fieldname01}
<?php endif; ?>
But when wrap this code around a checkbox field it results into this output in the email:
array ( 0 => 'value01', 1 => 'value02', )
Could u please provide me the handle array you talk about into the submit button to avoid this? i have no clou how to do this :/
Thank u so far🙂
Thanks for reply🙂
now i get this error when i try to setup the handle array😟
please see screenshot attached.
now i get this error when i try to setup the handle array😟
please see screenshot attached.
Hi Ademma,
They are warnings, not errors - you can usually hide them by setting your site Error Reporting to System Default or None in the site Global Configuration.
These particular warnings can happen if you have a form input with no label - try putting a single space in the label if you want to leave one blank.
Bob
They are warnings, not errors - you can usually hide them by setting your site Error Reporting to System Default or None in the site Global Configuration.
These particular warnings can happen if you have a form input with no label - try putting a single space in the label if you want to leave one blank.
Bob
This topic is locked and no more replies can be posted.