Hi
I am trying to create some content that displays a graph generated by a remote service. I want to put a couple of of buttons or a check box that allow the user to choice what kind of graph should be generated. I also need a way for an admin to configure some of the settings for this content. The admin should be able to configure the image size, base url, ...
My approach was to define my own content type. I defined
_install(), __uninstall() , _node_info(), and _form() hooks.
So far so good, My admin can create content of this type, and correctly config the content (set the base URL, image size, ...)
My problem is in my _view()
1) I get the form data set by the admin
2) use unset() so that the form fields set by the admin are not display
3) get the image from the remote service
4) generate my display as follows
<?php
$output = "some html tags";
$node->content['bdc_button_bar']['bdc_graph'] = array(
'#markup' => $output,
'#weight' => 3,
);
$node->content['bdc_button_bar']['timeUnit'] = array(
'#title' => t("Choice a graph type"),
'#type' => 'select',
'#options' => array(
'DAY' => 'DAY',
'WEEK' => 'WEEK',
'MONTH' => 'MONTH',
'YEAR' => 'YEAR',
),
'#ajax' => array(