Paying service for help me to complete the following tasks:

1) How can I embed a view into a node new/edit form by using API? I have exposed filters for the view and would like to include it as well.
2) How to alter the view and include an additional column as buttons? Should I use view_data_alter hook or other approaches?
3) How to do: The button on the view will alter the DOM and when the form is submitted, I need to process the submitted data (rows) and populate to a field collection field (CCK added) to the node.

Thank you very much!
Ray

Comments

asghar’s picture

Hi rtsang
I think you should describe your whole story what you are going to do then community will able to give you better idea which approach will be easily and more precisely. However I have described my answers below

1. Number of modules available e.g https://drupal.org/project/eva, https://drupal.org/project/embed_views but you ca also embed views with code

print views_embed_view('name_of_view','page_1', $node->nid);

For a View "block"

print views_embed_view('faculty_core','block_1', $node->nid);

2. You can alter output data with tpl files or theme functions.
3. Might be you achieve this with custom developing.

ian-moran’s picture

Hey Ray,

1. Use hook_form_alter and insert views_embed_view (https://api.drupal.org/api/views/views.module/function/views_embed_view/7) where you need the view.

2. This might give you what you need - https://drupal.org/node/1517916.

3. I'm not entirely clear what you need, but you could create a custom submit function to pass the data to the field and reload the page with ajax.

All the best

Ian