I'm a newbie to drupal and PHP coding.

I have a simple php script that is passed 3 values from node CCK fields in a table view.
I'm taking a look at the sample vef_test_form provided, but can't figure out how to pass the CCK field values to the function.

what functions do I use to get the other row values for:

$form['xxx'] = array ( '#value' => ???

Any help would be greatly appreciated!
Thanks.

Comments

mettam’s picture

I also am having trouble figuring out how to access the content of the fields in the row. I've looked at the documentation and the example and tried this:

function time_off_approval_form(&$form_state, $row) {

$form['pto_id'] = array(
'#type' => 'value',
'#value' => intval($row->entry_ID),
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Approve'),
);

return $form;
}

But that doesn't read in the value that I need. Am I missing something?

The form is there, and it sends a message, but it's not able to access the data I need.

Thanks for any help you can offer.

meba’s picture

What is "entry_ID"? There is no such field in views. Don't you mean $row->nid?

mettam’s picture

No, because my view isn't a node view. Does the VEF only work for node views?

meba’s picture

Status: Active » Closed (cannot reproduce)

Sorry for a delayed comment. You can always do something like dpm($row) to check what fields you have available.

VEF was designed with Node views but nothing really prevents other types from succesfull operation, there is just going to be a different field, find it using Devel dpm() function.