User login

Interim almost have ability to add onto a form before post

Actually, Agaric can add onto the form before submitting with this code in form_alter, action_node_form hook, to catch and stop repeats of drupal_execute.

      if (isset($form['#post']['already_submitted']['#value'])) {
        unset($form['#submit']);
        $form['#submit']['node_form_submit'] = array();
...
        return;
      }

But we can't seem to add onto the subform from this place, after the user has put in their data, but before the forms are submitted for real, and the data saved.

(Fairly certain we could make a custom form, and drupal_execute parts of it separately with this catch and release system, so if there's no follow-up post, that's your take-away!)

We're not ready for the big "understand everything" post, so here are a few more meandering byways on our way to an answer:

drupal set redirect

THE question is whether we have a program issue or if it's just that we need action enabled in OG to be added to the group.

Your Action group has been created.

this nid 268

nid nodeapi 268

Your Action has been created.

Says the latter.

It is indeed the latter.

So no question we have to work around organic groups' dislike of

drupal_set_message('

? ' . print_r($form, TRUE) . '

');
if (isset($form['og_group_embedded'])) {
$simple = TRUE;
}

doesn't work because -- I think -- wsf_action is a heavy weighted module, so it's form_alter runs after

adding it to the element that calls the subform

          $form['action_group'] = array(
            '#type' => 'subform',
            '#id' => 'action_group_node_form',
            '#arguments' => array(array(
              'uid' => $uid,
              'type' => 'action_group',
              'og_embedded' => TRUE,
            )),
            '#after_build' => array(
              'subform_element_build_subform',
              'wsf_action_fix_subform',
            ),
            '#data_separation' => TRUE,
            '#weight' => -40,
          );

didn't work

Neither did anything I added to my after_build function do anything.

Resolution

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.