Hi,
I have a few stumbling blocks (new to drupal) which answers to would help me loads!
1) I've looked at the Forms API for 4.7, and I notice in there that there's a form_submit() function, I assumed I always needed this to submit my form... However, when looking at module example (http://drupaldocs.org/api/head/file/contributions/docs/developer/example...) there's no submit?
I can see a node_example_insert, and node_example_update - do those override the submit? Or do I only need the form_submit if I'm writing a piece of code which isn't a module?
2) How do I call my module? At the moment, I just inserted the module_example_form() into a random node and the form is displayed ... is that the proper way to do it?
3) In the example, the hook_view implementation is:
function node_example_view(&$node, $teaser = FALSE, $page = FALSE) {
$node = node_prepare($node, $teaser);
$order_info = theme('node_example_order_info', $node);
$node->body .= $order_info;
$node->teaser .= $order_info;
}
does the 'theme... node_example_order_info' part call:
function theme_node_example_order_info($node) {
$output = '
';
$output .= t('The order is for %quantity %color items.', array('%quantity' => $node->quantity, '%color' => $node->color));
$output .= '
';
return $output;
}
That?