Search
 
SCRIPT & CODE EXAMPLE
 

PHP

how to get the values of other fields in acf validate values

add_filter('acf/validate_value/key=field_56e069e986d6f', 'my_validate_function', 10, 4);

function my_validate_function($valid, $value, $field, $input) {
  $other_field_key = 'field_56e06fe24d3e7';
  $other_value = $_POST['acf'][$other_field_key];
  // now you can do validation based on the other value
  return $valid
}
Comment

PREVIOUS NEXT
Code Example
Php :: how to set session timeout in codeigniter 
Php :: zend redirect to url 
Php :: php change an associative array into indexed array 
Php :: subtract some days php 
Php :: carbon add days 
Php :: check network connection php 
Php :: php post curl json 
Php :: loop through values of hash php 
Php :: difference between two timestamps php 
Php :: a backwards counting forloop 
Php :: decode utf-8 php 
Php :: laravel with trashed specific 
Php :: php remove slashes from json 
Php :: alert a php variable 
Php :: get current page php 
Php :: php pdo set charset 
Php :: laravel 5.4 forelse 
Php :: how to insert if php in html 
Php :: create variable in laravel blade 
Php :: array flip php 
Php :: laravel login by id 
Php :: composer create-project laravel/laravel --prefer-dist laravel-bootstrap 
Php :: scan all directories and files php 
Php :: bindings laravel 
Php :: asset not working in laravel 
Php :: wordpress get page slug 
Php :: remove repeated columns laravel 
Php :: update json file php 
Php :: add new column in existing table in laravel migration 
Php :: integer nullable laravel 
ADD CONTENT
Topic
Content
Source link
Name
9+6 =