Hi,

Great module, thanks very much for your work.

It would be great for my users if selecting a value from a drop-down-select-list in the top node-add form created an update so that all the other multi-node-add forms matched the same selection.

Additionally it would be great (for a serial number) if they could enter a serial number in the top node-add form and then the values for all the other forms were +1 of the form above.

For both of these tasks I would usually use Jquery but I have an issue. The Jquery script gets loaded in the head of the document but every multi-node-add form has it's own head and so the Jquery gets duplicated in every multi-node form and therefore the Jqeury can only access and manipulate select lists in one form ... which makes it impossible to use Jquery to grab a value from one form (for example the value selected in a select list) and use it to make all the other select lists match that value (or increment serial numbers).

Do you have any ideas as to how I might achieve this functionality?

Thanks very much for your work on this module and have a great day!

Comments

aron novak’s picture

http://drupal.org/node/1931910#comment-7164474
I planned to do this, i think it's partially what you want. Hopefully i have time to do that, but if you can contribute with code, it would be awesome.
My idea is to add the javascript to the multi_node_add_page() form, it's not duplicated then.
http://stackoverflow.com/questions/364952/jquery-javascript-accessing-co...
Same origin policy of course, is not a problem for us, as it's the same site.

aron novak’s picture

Status: Active » Fixed

http://drupalcode.org/project/multi_node_add.git/commitdiff/9580b8df177c...

We have this new feature in the code.
Let's wait for the next -dev or grab the stuff from GIT. I'd be happy to hear feedbacks if it works for you or not. Also any suggestions for improving this stuff is highly appreciated.

kingswoodute’s picture

Hey thanks very much Aron, I really appreciate that.

I'll apply the patch and let you know how it goes. This will be really useful for me and I'm sure for other users too.

kingswoodute’s picture

Status: Fixed » Needs work

Hi Aron,

Have installed the new Dev. Great work and thanks very much!

I have noticed one small issue.

The prepopulate function works great if I use it from /multi_node_add/assembly and it's a great feature.

But when I create a shortcut URL (setting a standard configuration of fields to display and the number of nodes to add in one go and use that link, nothing appears in the multi-node add form except the "create" button).

I've checked with firebug and (whilst I'm not a great coder) I think the issue may be in the form action definition. In the version that works (/multi_node_add/assembly) I can see;

<div id="skip-link">
<form id="assembly-node-form" class="node-form node-assembly-form" accept-charset="UTF-8" method="post" action="/multi_node_add/frame/assembly/title,path,field_assembly_part_number,field_registration_date,field_assembly_serial_number,field_unassigned">

In the shortcut URL version (multi_node_add/assembly?fields=title,path,field_assembly_part_number,field_registration_date,field_assembly_serial_number,field_unassigned&num=5) that is not working I can see;

<div id="skip-link">
<form id="assembly-node-form" class="node-form node-assembly-form" accept-charset="UTF-8" method="post" action="/multi_node_add/frame/assembly/">

As you can see the form action does not contain the fields. This may be a symptom of another issue so if you need any more info please don't hesitate to let me know.

Once again thanks for all your work on this module (it's hugely appreciated) and have a great day.

kingswoodute’s picture

Version: 7.x-1.0-beta1 » 7.x-1.x-dev

Oops, sorry I forgot to change the Version to the dev 7.x-1x-dev version which I downloaded on your suggestion.

aron novak’s picture

Status: Needs work » Fixed

the above bug is fixed now, you'll have it in the next -dev.

kingswoodute’s picture

Thanks Aron, awesome work and I really appreciate it!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit 9580b8d on 7.x-1.x, 8.x-1.x by Aron Novak:
    adding new feature of prepopulating forms based on the first one, it's...