Created
June 28, 2016 01:42
-
-
Save wluisi/0e9681e2437444c4c6f979b98687eaa6 to your computer and use it in GitHub Desktop.
rw inline error search form
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// admin/config/user-interface/ife | |
// Set search form to 'enabled' and "remove all messages". | |
// LZ filter validation | |
$lz_filter_raw = $form_state['values']['lz_filter']; | |
preg_match_all('!\d+!', $lz_filter_raw, $zipcode); | |
$zipcode = $zipcode[0][0]; | |
// Check if zip code is in RW database | |
$lz_filter = rrd_search_validate_rw_db_zipcode($zipcode); | |
if (!$lz_filter) { | |
form_set_error('lz_filter', t('Error! We do not have your zip code in our database')); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment