Reviewed & tested by the community
Project:
Views Custom Field
Version:
6.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 Mar 2010 at 04:32 UTC
Updated:
17 Dec 2010 at 23:44 UTC
Jump to comment: Most recent file
Comments
Comment #1
mikeytown2 commentedHow about having this code on the view form as a code box ready to paste in?
Comment #2
intyms commentedto put a collapsibe fieldset on the "Customfield" form, we have to add the following code to "views_customfield_handler_field_phpcode.inc" :
place the code inside "function options_form(&$form, &$form_state)"
between $form['value'] and $form['sortable'].
The problem is that i don't know how to add the variables stored inside $data to the '#description' field from above.
Can anybody with php skils help to finish the implementation of this feature ?
Comment #3
Slovak commentedSubscribe
Comment #4
mikeytown2 commentedHere's a patch based off of #2. Makes the code ready to paste in.
Comment #5
intyms commentedI have observed just one thing, there are many "+" and "-" signs inside of the patch.
Everything else is great, patch forks very well !!! Thanks a lot!
Comment #6
intyms commentedComment #7
mikeytown2 commentedthe + and - is my editor fixing white space issues automatically.
http://drupal.org/project/coder
http://drupal.org/coding-standards#indenting
If this is an issue I can manually roll out a new patch with the whitespace fixes removed.
Comment #8
intyms commentedoh, i see, sorry.
I tested the patch, it works great for me.
Comment #9
mikeytown2 commentedComment #10
iantresman commentedIs it possible to convert the output into "PHP Variable code"? For example, the patch outputs something like this:
But I'm not sure how to output either the value, or label, when using PHP. I have eventually worked out (and it took some time, and will take time when I try again in several weeks), that
To output the value of
[node_data_field_quantity_field_price_value]I must enter:<?php echo $data->node_data_field_quantity_field_price_value; ?>which is not intuitive! And can you output anything else?