Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • in reply to: Duplicate Single Text Field #21567
    security_man
    Participant

    okay, we are almost there… i have everything figured out except that somehow if i clone a dropdown (select field) it does not show the selected option when i use $form->setValue in a pre_display hook. The html shows the correct option with the “selected” in it, but it does not display. looks like some kind of css3 issue, but i cant figure out how to resolve it?

    in reply to: Duplicate Single Text Field #21431
    security_man
    Participant

    one more question… hopefully you can answer all of them at once.

    Once i have the fields cloned and the data sent to the database, how would i create new fields and populate them if i needed users to be able to edit the database

    in reply to: Duplicate Single Text Field #21430
    security_man
    Participant

    well, i am close… this works as a validator, but it shows the error on all the cloned fields… any idea how to add it to only the one that triggers it?

    function required_multiple_validator($valid, $value, $element) {
    	if($element->getName() == "iphorm_2_27" && is_array($value)) {
    		foreach($value as $val) {
    			if(empty($val)) {
    				$element->addError('this field is required');
    				$valid = false;
    				end;
    			}
    		}
    	}
    	return $valid;
    }
    add_filter('iphorm_element_valid','required_multiple_validator', 10, 3);
    in reply to: Duplicate Single Text Field #21429
    security_man
    Participant

    how would i go about validating this? When you add_filter(‘iphorm_element_valid_iphorm_2_46 if you have added the [] to the end via javascript then the filter never fires.

    in reply to: Latest Version? #21392
    security_man
    Participant

    which version should this functionality be available in?

    in reply to: Not Inserting Some Conditional Fields #20288
    security_man
    Participant

    is there any way to enable that? I have fields that i would like to hide after some logic, but still have the data that is in them submitted

Viewing 6 posts - 1 through 6 (of 6 total)
Be inspired. © 2025 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy