<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="https://www.symmetricaldesigns.com"  xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>Symmetrical Designs - jquery</title>
 <link>https://www.symmetricaldesigns.com/blog-tags/jquery</link>
 <description></description>
 <language>en</language>
<item>
 <title>Group Add More: Simulate clicking on group of multi-value fields </title>
 <link>https://www.symmetricaldesigns.com/blog/group-add-more-simulate-clicking-on-group-of-multi-value-fields</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;A custom content type that we built recently had multiple fields which accepted unlimited values. Some of these fields were grouped together and expected to accept values together.&lt;/p&gt;
&lt;p&gt;The fix to this problem is rather simple. Simulate clicking on individual &quot;Add More&quot; buttons. We generalized this idea and create a jQuery plugin to facilitate this on any group of multi-value fields inside a container. This is supported for Drupal 6 &amp;amp; 7. Use the plugin from the approriate github branch from: &lt;a href=&quot;https://github.com/nkmani/group-add-more&quot;&gt;https://github.com/nkmani/group-add-more&lt;/a&gt; (1.0 is for D6 and 2.0 is for D7).&lt;/p&gt;
&lt;p&gt;To use this plugin:&lt;br /&gt;
Include the jquery.group-add-more.js file (both development as well as minified versions are available) in your theme.&lt;br /&gt;
Include the javascript snippet to attach the plugin to the container that has the add-more buttons.&lt;/p&gt;
&lt;p&gt;The rendered group field would look like as shown below.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-field-blog-category field-type-taxonomy-term-reference field-label-hidden clearfix&quot;&gt;&lt;ul class=&quot;links&quot;&gt;&lt;li class=&quot;taxonomy-term-reference-0&quot;&gt;&lt;a href=&quot;/blog-categories/drupal&quot;&gt;Drupal&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-field-heading field-type-text field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;For Drupal 6:&lt;/div&gt;&lt;div class=&quot;field-item odd&quot;&gt;For Drupal 7:&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-field-image field-type-image field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;img src=&quot;https://www.symmetricaldesigns.com/sites/default/files/blog-images/d6-group-add.png&quot; width=&quot;429&quot; height=&quot;509&quot; alt=&quot;&quot; /&gt;&lt;/div&gt;&lt;div class=&quot;field-item odd&quot;&gt;&lt;img src=&quot;https://www.symmetricaldesigns.com/sites/default/files/blog-images/d7-group-add.png&quot; width=&quot;542&quot; height=&quot;296&quot; alt=&quot;&quot; /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-field-description field-type-text-long field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;$(document).ready(function() {&lt;br /&gt;  $(&quot;.node-form .group-images&quot;).group_add_more({hide: true});&lt;br /&gt;});&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div class=&quot;field-item odd&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;(function ($) {&lt;br /&gt;  Drupal.behaviors.ga = {&lt;br /&gt;    attach: function (context, settings) {&lt;br /&gt;      $(&quot;.node-test-form&quot;).group_add_more({hide: true});      &lt;br /&gt;    }&lt;br /&gt;  }  &lt;br /&gt;})(jQuery);&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-field-blog-tags field-type-taxonomy-term-reference field-label-above clearfix&quot;&gt;&lt;h3 class=&quot;field-label&quot;&gt;Tags: &lt;/h3&gt;&lt;ul class=&quot;links&quot;&gt;&lt;li class=&quot;taxonomy-term-reference-0&quot;&gt;&lt;a href=&quot;/blog-tags/jquery&quot;&gt;jquery&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;taxonomy-term-reference-1&quot;&gt;&lt;a href=&quot;/blog-tags/drupal6&quot;&gt;drupal6&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;taxonomy-term-reference-2&quot;&gt;&lt;a href=&quot;/blog-tags/drupal7&quot;&gt;drupal7&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-field-blog-addthis field-type-addthis field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;div class=&quot;addthis_toolbox addthis_default_style  &quot; addthis:title=&quot;Group Add More: Simulate clicking on group of multi-value fields  - Symmetrical Designs&quot; addthis:url=&quot;https://www.symmetricaldesigns.com/blog/group-add-more-simulate-clicking-on-group-of-multi-value-fields&quot;&gt;&lt;a href=&quot;http://www.addthis.com/bookmark.php?v=250&quot; class=&quot;addthis_button_facebook&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;http://www.addthis.com/bookmark.php?v=250&quot; class=&quot;addthis_button_twitter&quot;&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Thu, 11 Feb 2016 00:59:04 +0000</pubDate>
 <dc:creator>mani</dc:creator>
 <guid isPermaLink="false">135 at https://www.symmetricaldesigns.com</guid>
</item>
</channel>
</rss>
