<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Form - Dependent fields repeating for 100 inputs. What's the best approach? in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/Form-Dependent-fields-repeating-for-100-inputs-What-s-the-best/m-p/5937#M586</link>
    <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/131"&gt;@Ty&lt;/a&gt;&lt;/P&gt;&lt;P&gt;That's an awesome hack! Thanks for info.&lt;/P&gt;</description>
    <pubDate>Thu, 26 Jan 2017 19:48:15 GMT</pubDate>
    <dc:creator>ndwilliams3</dc:creator>
    <dc:date>2017-01-26T19:48:15Z</dc:date>
    <item>
      <title>Form - Dependent fields repeating for 100 inputs. What's the best approach?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Form-Dependent-fields-repeating-for-100-inputs-What-s-the-best/m-p/5855#M572</link>
      <description>&lt;P&gt;Hi, I'm working on a complex project with multiple forms and dependent inputs, and I'm wondering what would be the best approach. Basically, the user is reviewing products he likes (in a list of 100 products, separated by categories). The users sees a checkbox + image of product + name of product&amp;nbsp;(for each product). When a&amp;nbsp;box is checked, 2 new fields have to appear right below it for rating and commenting on that checked product.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was thinking of separating each category on a separate form (about 6 categories) so the page isn't too long to load.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1st question: Is there a way to reuse the rating and comment fields, or do I really have to create 100 rating, and 100 comment fields?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2nd question: Is there a way to work on my form in a text editor (Sublime) and once everything is to my liking, importing it to Hubspot?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3rd question: can I add content (let's say the product image for example) in jQuery on document load if it's not possible to add an image next to a checkbox? Or will that create problems? Or adding it with the css&amp;nbsp;content value?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If someone has another idea on how to approach this, please let me know! &amp;nbsp;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2017 22:28:24 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Form-Dependent-fields-repeating-for-100-inputs-What-s-the-best/m-p/5855#M572</guid>
      <dc:creator>bg1</dc:creator>
      <dc:date>2017-01-25T22:28:24Z</dc:date>
    </item>
    <item>
      <title>Re: Form - Dependent fields repeating for 100 inputs. What's the best approach?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Form-Dependent-fields-repeating-for-100-inputs-What-s-the-best/m-p/5860#M573</link>
      <description>&lt;P&gt;From experience, Hubspot is not the best tool for complex, multipage forms with conditionals. I would suggest using Surveymonkey and the integration with Hubpsot for this. You can use rating and matrix fields that are better for your intended purpose.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2017 23:28:01 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Form-Dependent-fields-repeating-for-100-inputs-What-s-the-best/m-p/5860#M573</guid>
      <dc:creator>ndwilliams3</dc:creator>
      <dc:date>2017-01-25T23:28:01Z</dc:date>
    </item>
    <item>
      <title>Re: Form - Dependent fields repeating for 100 inputs. What's the best approach?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Form-Dependent-fields-repeating-for-100-inputs-What-s-the-best/m-p/5902#M580</link>
      <description>&lt;P&gt;Hi there&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/3157"&gt;@bg1&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Conditionals in HubSpot forms are always tricky, but I'm going to do my best to help you out &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. The way the forms integrate with the Contacts DB won't allow you to reuse forms, because when you create a custom field/property, it updates that field on your contact record. So for example, if I checked favorite product 1, and I fill out the 2 conditionals that pop up, that data would be stored on my contact. But as soon as I feel out favorite product 2, that data is then overwritten, since there is only 1 "property" to write to that matches the paramaters.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. The forms are auto generated by us on the server side, so you wouldn't be able to re upload. HOWEVER, there is a somewhat 'hacky' solution to this, that I'll explain below. *&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3. I've never actually tried this, but from&amp;nbsp;messing with inspect element, it seems plausible. But after looking at the code, you may be hard-pressed to be able to target down to a specific check box ( you would probably be utilizing a lot of nth-child).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;** Long before I was working at HubSpot, I worked for a software company. My job title said "developer" but really it was more about pushing the capabilities of HubSpot's tools and COS. What I have found out is that, you can wite a form in complete HTML, and using the class/reactid on your embedded form, you can create a form that will successful update to your contacts DB. This solution actually doesn't use any custom JS to POST either.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Although I can't recommend this for a very serious implementation,&amp;nbsp;&lt;A href="http://codepen.io/TyStelmach/pen/yNxMeJ" target="_self"&gt;My Fundraising Grader&lt;/A&gt;&amp;nbsp;may be on the right track for what you are looking to to accomplish.&lt;/P&gt;

&lt;IFRAME height="300" scrolling="no" title="Fundraising Grader" src="https://codepen.io/TyStelmach/embed/yNxMeJ/?height=300&amp;amp;theme-id=14674&amp;amp;default-tab=result&amp;amp;embed-version=2" frameborder="no" allowtransparency="true" allowfullscreen="true" style="width: 100%;"&gt;See the Pen &amp;amp;amp;amp;amp;lt;a href='&amp;amp;amp;amp;lt;a href="http://codepen.io/TyStelmach/pen/yNxMeJ/'&amp;amp;amp;amp;amp;gt;Fundraising" target="_blank"&amp;amp;amp;amp;gt;http://codepen.io/TyStelmach/pen/yNxMeJ/'&amp;amp;amp;amp;amp;gt;Fundraising&amp;amp;amp;amp;lt;/a&amp;amp;amp;amp;gt; Grader&amp;amp;amp;amp;amp;lt;/a&amp;amp;amp;amp;amp;gt; by Ty Stelmach (&amp;amp;amp;amp;amp;lt;a href='&amp;amp;amp;amp;lt;a href="http://codepen.io/TyStelmach'&amp;amp;amp;amp;amp;gt;@TyStelmach&amp;amp;amp;amp;amp;lt;/a" target="_blank"&amp;amp;amp;amp;gt;http://codepen.io/TyStelmach'&amp;amp;amp;amp;amp;gt;@TyStelmach&amp;amp;amp;amp;amp;lt;/a&amp;amp;amp;amp;lt;/a&amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;gt;) on &amp;amp;amp;amp;amp;lt;a href='&amp;amp;amp;amp;lt;a href="http://codepen.io'&amp;amp;amp;amp;amp;gt;CodePen&amp;amp;amp;amp;amp;lt;/a" target="_blank"&amp;amp;amp;amp;gt;http://codepen.io'&amp;amp;amp;amp;amp;gt;CodePen&amp;amp;amp;amp;amp;lt;/a&amp;amp;amp;amp;lt;/a&amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;gt;.
&lt;/IFRAME&gt;

&lt;P&gt;Hope this helps you out!&lt;/P&gt;
&lt;P&gt;-- Ty&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2017 15:15:33 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Form-Dependent-fields-repeating-for-100-inputs-What-s-the-best/m-p/5902#M580</guid>
      <dc:creator>Ty</dc:creator>
      <dc:date>2017-01-26T15:15:33Z</dc:date>
    </item>
    <item>
      <title>Re: Form - Dependent fields repeating for 100 inputs. What's the best approach?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Form-Dependent-fields-repeating-for-100-inputs-What-s-the-best/m-p/5935#M585</link>
      <description>&lt;P&gt;Thanks for the quick reply!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regarding #3: I found a way without using nth-child. It also englobes it in the label for, so clicking it also selects the checkbox. &amp;nbsp;Then again, the only downside is I'll have to create a line for each of my 100 products. &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt;$('label[data-reactid*="nfoa_prods_hair1"]:not(label.hs-form-booleancheckbox-display)').append('&amp;lt;img src="product-img.png"&amp;gt;');&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2017 19:36:43 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Form-Dependent-fields-repeating-for-100-inputs-What-s-the-best/m-p/5935#M585</guid>
      <dc:creator>bg1</dc:creator>
      <dc:date>2017-01-26T19:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: Form - Dependent fields repeating for 100 inputs. What's the best approach?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Form-Dependent-fields-repeating-for-100-inputs-What-s-the-best/m-p/5937#M586</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/131"&gt;@Ty&lt;/a&gt;&lt;/P&gt;&lt;P&gt;That's an awesome hack! Thanks for info.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2017 19:48:15 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Form-Dependent-fields-repeating-for-100-inputs-What-s-the-best/m-p/5937#M586</guid>
      <dc:creator>ndwilliams3</dc:creator>
      <dc:date>2017-01-26T19:48:15Z</dc:date>
    </item>
  </channel>
</rss>

