* <input type="password" name="password" />
* </form>
*
- * @param string $action The name of the action (without the leading "action/") -- e.g. "login"
+ * @param string $action The name of the action. An action name does not include
+ * the leading "action/". For example, "login" is an action name.
* @param array $form_vars $vars environment passed to the "input/form" view
* @param array $body_vars $vars environment passed to the "forms/$action" view
*
function elgg_view_form($action, $form_vars = array(), $body_vars = array()) {
global $CONFIG;
- if (isset($form_vars['action'])) {
- $form_vars['action'] = "action/{$form_vars['action']}";
- }
-
$defaults = array(
'action' => $CONFIG->wwwroot . "action/$action",
'body' => elgg_view("forms/$action", $body_vars),
$form_vars = array('enctype' => 'multipart/form-data');
$body_vars = file_prepare_form_vars($file);
-var_dump($body_vars);
+
$content = elgg_view_form('file/upload', $form_vars, $body_vars);
$body = elgg_view_layout('content', array(
$form_params = array(
'internalid' => 'messages-reply-form',
'class' => 'hidden',
- 'action' => 'messages/send',
+ 'action' => 'action/messages/send',
);
$body_params = array('message' => $message);
$content .= elgg_view_form('messages/reply', $form_params, $body_params);