@@ -1308,6 +1308,9 @@ description: "Fast delivery of scalable IoT solutions with fixed cost and timeli
13081308 <input type="hidden" name="utm_term" id="utm_term">
13091309 <input type="hidden" name="utm_content" id="utm_content">
13101310 <input type="hidden" name="client_id" id="client_id">
1311+ <input type="hidden" name="tags" id="tags" value="custom dev">
1312+ <input type="hidden" name="form_id" id="form_id" value="dev_unit">
1313+ <input type="hidden" name="path" id="path" value="">
13111314 <div class="hp-container">
13121315 {% assign random_hp = 'hp_' | append: site.time | append: site.time | replace: ' ', '' | slice: 0, 10 %}
13131316 <label for="{{ random_hp }}">Leave this field empty</label>
@@ -1339,19 +1342,19 @@ description: "Fast delivery of scalable IoT solutions with fixed cost and timeli
13391342 <div class="form-section">
13401343 <div class="form-element">
13411344 <label for="name">
1342- <input class="form-control cdu-form-control" value="" placeholder="John Doe" name="name-popup " id="name-popup" type="text" size="40" maxlength="50" aria-invalid="false">
1345+ <input class="form-control cdu-form-control" value="" placeholder="John Doe" name="name" id="name-popup" type="text" size="40" maxlength="50" aria-invalid="false">
13431346 <p>Name</p>
13441347 </label>
13451348 </div>
13461349 <div class="form-element">
13471350 <label for="email">
1348- <input class="form-control cdu-form-control" value="" placeholder="john@example.com" name="email-popup " id="email-popup" type="email" size="40" maxlength="80" aria-invalid="false">
1351+ <input class="form-control cdu-form-control" value="" placeholder="john@example.com" name="email" id="email-popup" type="email" size="40" maxlength="80" aria-invalid="false">
13491352 <p>Email Address</p>
13501353 </label>
13511354 </div>
13521355 <div style="display: none" class="form-element next">
1353- <label for="subject-popup " class="select-label">
1354- <select class="form-control select cdu-form-control" name="subject-popup ">
1356+ <label for="subject" class="select-label">
1357+ <select class="form-control select cdu-form-control" name="subject">
13551358 <option value="" disabled>Select Subject</option>
13561359 <option value="Custom Development" selected>Custom Development</option>
13571360 <option value="Technical Support">Technical Support</option>
@@ -1369,7 +1372,7 @@ description: "Fast delivery of scalable IoT solutions with fixed cost and timeli
13691372 </div>
13701373 <div class="form-element next">
13711374 <label for="msg-popup">
1372- <textarea id="msg-popup" class="form-control text-area cdu-form-control cdu-text-area" value="" placeholder="Type your message here" name="message-popup " type="text" size="40" maxlength="800"></textarea>
1375+ <textarea id="msg-popup" class="form-control text-area cdu-form-control cdu-text-area" value="" placeholder="Type your message here" name="message" type="text" size="40" maxlength="800"></textarea>
13731376 <p class="text-area-label">Message</p>
13741377 </label>
13751378 </div>
@@ -1378,9 +1381,9 @@ description: "Fast delivery of scalable IoT solutions with fixed cost and timeli
13781381 <fieldset>
13791382 <legend class="accordion-button active">Are you familiar with ThingsBoard? (optional)<svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg></legend>
13801383 <div class="label-container accordion-content" style="max-height: 134px">
1381- <label><input id="familiarity-work-with-platform-popup" type="radio" name="thingsboard-popup " value="Yes, I work with the platform"/> Yes, I work with the platform</label>
1382- <label><input id="familiarity-familiar-popup" type="radio" name="thingsboard-popup " value="Yes, I am familiar with it, but haven’t worked with it"/> Yes, I am familiar with it, but haven’t worked with it</label>
1383- <label><input id="familiarity-not-familiar-popup" type="radio" name="thingsboard-popup " value="No, I am not familiar with it"/> No, I am not familiar with it</label>
1384+ <label><input id="familiarity-work-with-platform-popup" type="radio" name="thingsboard" value="Yes, I work with the platform"/> Yes, I work with the platform</label>
1385+ <label><input id="familiarity-familiar-popup" type="radio" name="thingsboard" value="Yes, I am familiar with it, but haven’t worked with it"/> Yes, I am familiar with it, but haven’t worked with it</label>
1386+ <label><input id="familiarity-not-familiar-popup" type="radio" name="thingsboard" value="No, I am not familiar with it"/> No, I am not familiar with it</label>
13841387 </div>
13851388 </fieldset>
13861389 <fieldset>
@@ -1402,12 +1405,15 @@ description: "Fast delivery of scalable IoT solutions with fixed cost and timeli
14021405 </div>
14031406 </fieldset>
14041407 </div>
1405- <input type="hidden" name="utm_source-popup" id="utm_source-popup">
1406- <input type="hidden" name="utm_medium-popup" id="utm_medium-popup">
1407- <input type="hidden" name="utm_campaign-popup" id="utm_campaign-popup">
1408- <input type="hidden" name="utm_term-popup" id="utm_term-popup">
1409- <input type="hidden" name="utm_content-popup" id="utm_content-popup">
1410- <input type="hidden" name="client_id-popup" id="client_id-popup">
1408+ <input type="hidden" name="utm_source" id="utm_source">
1409+ <input type="hidden" name="utm_medium" id="utm_medium">
1410+ <input type="hidden" name="utm_campaign" id="utm_campaign">
1411+ <input type="hidden" name="utm_term" id="utm_term">
1412+ <input type="hidden" name="utm_content" id="utm_content">
1413+ <input type="hidden" name="client_id" id="client_id">
1414+ <input type="hidden" name="tags" id="tags" value="custom dev">
1415+ <input type="hidden" name="form_id" id="form_id" value="dev_unit_modal">
1416+ <input type="hidden" name="path" id="path" value="">
14111417 <div class="hp-container">
14121418 {% assign random_hp = 'hp_' | append: site.time | append: site.time | replace: ' ', '' | slice: 0, 10 %}
14131419 <label for="{{ random_hp }}">Leave this field empty</label>
@@ -1816,7 +1822,6 @@ description: "Fast delivery of scalable IoT solutions with fixed cost and timeli
18161822 });
18171823 });
18181824
1819-
18201825 document .addEventListener (' DOMContentLoaded' , () => {
18211826 const timelineBlocks = document .querySelectorAll (' .mobile-timeline .right > div' );
18221827
@@ -1844,6 +1849,7 @@ description: "Fast delivery of scalable IoT solutions with fixed cost and timeli
18441849
18451850 utmKeys .forEach (function (key ) {
18461851 let value = getURLParam (key);
1852+
18471853 if (value) {
18481854 localStorage .setItem (key, value);
18491855 } else {
@@ -1854,18 +1860,19 @@ description: "Fast delivery of scalable IoT solutions with fixed cost and timeli
18541860 value = decodeURIComponent (value);
18551861 utmData[key] = value;
18561862 $form .find (' input[name="' + key + ' "]' ).val (value);
1857- $form .find (' input[name="' + key + ' -popup"]' ).val (value);
18581863 }
18591864 });
18601865
1866+ const path = getPath ();
1867+ $form .find (' input[name="path"]' ).val (path);
1868+
18611869 const gaCookie = document .cookie .split (' ; ' ).find (row => row .startsWith (' _ga=' ));
18621870 if (gaCookie) {
18631871 const parts = gaCookie .split (' .' );
18641872 if (parts .length >= 4 ) {
18651873 const clientId = parts[2 ] + ' .' + parts[3 ];
18661874 utmData[' client_id' ] = clientId;
18671875 $form .find (' input[name="client_id"]' ).val (clientId);
1868- $form .find (' input[name="client_id-popup"]' ).val (clientId);
18691876 }
18701877 }
18711878 window .dataLayer = window .dataLayer || [];
@@ -1875,7 +1882,13 @@ description: "Fast delivery of scalable IoT solutions with fixed cost and timeli
18751882 });
18761883 }
18771884
1885+ function getPath () {
1886+ const url = new URL (window .location .href );
1887+ return url .pathname ;
1888+ }
1889+
18781890 function getURLParam (name ) {
1891+
18791892 const results = new RegExp (' [?&]' + name + ' =([^&#]*)' ).exec (window .location .href );
18801893 return results ? decodeURIComponent (results[1 ].replace (/ \+ / g , ' ' )) : null ;
18811894 }
@@ -1999,7 +2012,6 @@ description: "Fast delivery of scalable IoT solutions with fixed cost and timeli
19992012 const parentLabel = inputElement .closest (' label' );
20002013 let potentialErrorHint;
20012014
2002-
20032015 if (parentLabel && parentLabel .nextElementSibling && parentLabel .nextElementSibling .classList .contains (' error-message-hint' )) {
20042016 potentialErrorHint = parentLabel .nextElementSibling ;
20052017 } else {
0 commit comments