Download & Extend

hook_form_alter for fields inside a flexifield

Project:Flexifield
Version:6.x-1.0-alpha5
Component:Documentation
Category:support request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

i want to modify the #prefix/#sufix variables for a field that is inside a flexifield (so from another content type)
playing around with the $form variable inside a hook_form_alter hook i havent found a way to do this, i can set #prefix/#sufix wrappers around the flexifield itself though

any way to do this for each individual field? is there a function inside flexifield that runs over the $form array that i can hook into?

thanks

p.s. im actually trying to integrate conditional fields with the flexifield module

Comments

#1

for posterity, ive been able to work with these 2 functions:

<?php
// this one is getting called for each field and works for me
function hook_flexifield_child_field_form_alter(&$aElement, $aForm, $aFormState, $aFieldSettings) {

// this one is getting called once with all fields provided (i think)
function hook_flexifield_child_fields_form_alter(&$aElement, $aForm, $aFormState) {
?>

these 2 functions are called before a hook_form_alter

however, im still lacking data that a hook_form_alter would provide, like the field IDS (so that i can create unique prefixes with them), im still digging though, and still would welcome any advice from anyone on this

nobody click here