Appnitro Software Forums » MachForm

Zero values not displayed

(3 posts)

  1. neilkelly
    Member

    On the confirmation screen and emails, fields with a value of zero, i.e. '0' are not displayed with any value, the value is simply blank.

    Posted 1 month ago #
  2. You are right, this seems to be a bug.
    I'm investigating this further and will post the solution here, as soon as possible.

    Posted 1 month ago #
  3. Ok, here's how to fix this.

    Edit your includes/entry-functions.php file, search around line 414 for this code:

    if(!empty($entry_data['element_'.$element_id])){
    	$entry_details[$i]['value'] = $entry_data['element_'.$element_id];
    }

    replace it with this one:

    if(isset($entry_data['element_'.$element_id])){
    	$entry_details[$i]['value'] = $entry_data['element_'.$element_id];
    }

    That should display the zero values on the review page.

    To display the zero values on the email, edit includes/helper-functions.php, search around line 330 for this code:

    if(empty($data['value']) || $data['value'] == ' '){
    	continue;
    }

    replace it with this one:

    if((empty($data['value']) || $data['value'] == ' ')
      && $data['value'] !== 0 && $data['value'] !== '0'){
    	continue;
    }

    Let me know if you found any problem.

    Thanks for reporting this. I'll include this fix into the next build.

    Posted 1 month ago #

RSS feed for this topic

Reply

You must log in to post.