Forum Replies Created
- AuthorPosts
security_man
Participantokay, 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?
security_man
Participantone 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
security_man
Participantwell, 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);
security_man
Participanthow 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.
security_man
Participantwhich version should this functionality be available in?
security_man
Participantis 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
- AuthorPosts