You are here

function wf_crm_is_positive in Webform CiviCRM Integration 7.5

Same name and namespace in other branches
  1. 7.4 includes/utils.inc \wf_crm_is_positive()

Check if value is a positive integer

Parameters

mixed $val:

Return value

bool

5 calls to wf_crm_is_positive()
wf_crm_webform_base::findContact in includes/wf_crm_webform_base.inc
Find an existing contact based on matching criteria Used to populate a webform existing contact field
wf_crm_webform_postprocess::verifyExistingContact in includes/wf_crm_webform_postprocess.inc
Ensure we have a valid contact id in a contact ref field
wf_crm_webform_preprocess::findExistingActivities in includes/wf_crm_webform_preprocess.inc
Find activity ids based on url input or "existing activity" settings
wf_crm_webform_preprocess::findExistingCases in includes/wf_crm_webform_preprocess.inc
Find case ids based on url input or "existing case" settings
wf_crm_webform_preprocess::findExistingGrants in includes/wf_crm_webform_preprocess.inc
Find grant ids based on url input or "existing grant" settings

File

includes/utils.inc, line 1812
Webform CiviCRM module's common utility functions.

Code

function wf_crm_is_positive($val) {
  return is_numeric($val) && $val > 0 && round($val) == $val;
}