In my previous question, I asked on how to fetch views blocks, now I would like to do the same with the node form but somehow this is the code that almost worked for me:
setTimeout(function(){ $('.custom-form').load('?q=node/add/custom #custom-node-form', function() { Drupal.attachBehaviors(); }); }, 1000);
The ajax/jquery of the form doesn’t work anymore, for example: date field – popup calendar, unlimited field.
I also tried this:
setTimeout(function(){ $('.custom-form').load('?q=node/add/custom #custom-node-form', function() { Drupal.attachBehaviors($('#custom-node-form')); }); }, 1000);
still not working.
Are there other ways to load the node form with all it’s ajax/jquery settings?
I’m using this kind of approach because I have a super long form. When I try to print it on the template or on the regions/blocks, it affects the load speed. I don’t want this to be part of the page load.
UPDATE: I’m also trying to load the formblock module using the method I used on the ajax views as an alternative, I also can’t get it to work.
Thank you.