The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Customizing a Contact Form - Duda
ImNerdy
post Oct 12 2020, 05:41 PM
Post #1





Group: Members
Posts: 2
Joined: 12-October 20
Member No.: 27,590



Hello! We use the website builder, Duda, to create basic websites. I am running into an issue with their Contact Form widget where it doesn't allow for unique subjects per submission. So right now, the subject is set as a single subject for every single submission. As a result, gmail is theading up all of these submissions and the client is missing out on responding to legitimate leads.

So what I would like to happen is of the subject to be automatically populated in some way by the email address the submitter puts into the form. Below is the code for the widget which I am able to edit.

CODE
<!-- *** ADD OR EDIT HTML INSIDE OF THE dmRespCol DIVS, SEE DOCUMENTATION FOR GUIDELINES *** -->
<div class="u_1251441386 dmform default" preserve_css="true" dmle_widget="dudaContactUsRespId" id="1251441386" data-layout="layout-4" data-element-type="dContactUsRespId" captcha="true">
<h3 class="dmform-title dmwidget-title" id="1169913399">
</h3>
<div class="dmform-wrapper" preserve_css="true" id="1358205902">
  <form method="post" class="dmRespDesignRow" locale="ENGLISH" id="1040849708">
   <div class="dmforminput required  small-12 dmRespDesignCol medium-6 large-6" id="1516782077" localization_key_label="templates.custom.280">
    <label for="dmform-0" id="1819698524" class="" hide="true">
     First Name
    </label>
    <input type="text" class="" name="dmform-0" id="1769161175" placeholder="First Name" localization_key_placeholder="templates.custom.1363"/>
    <input type="hidden" name="label-dmform-0" id="1329928811" class="" value="First Name"/>
   </div>
   <div class="dmforminput required  small-12 dmRespDesignCol medium-6 large-6" id="1950234684" localization_key_label="templates.custom.280">
    <label for="dmform-1" id="1694006039" class="" hide="true">
     Last Name
    </label>
    <input type="text" name="dmform-1" placeholder="Last Name" id="1313731096" class="" localization_key_placeholder="templates.custom.1364"/>
    <input type="hidden" name="label-dmform-1" id="1834875691" class="" value="Last Name"/>
   </div>
   <div class="dmforminput required  small-12 dmRespDesignCol medium-6 large-6" id="1405789226" localization_key_label="templates.custom.280">
    <label for="dmform-2" id="1823774141" class="" hide="true">
     Phone
    </label>
    <input type="tel" class="" name="dmform-2" id="1970937722" placeholder="Phone" localization_key_placeholder="templates.custom.78"/>
    <input type="hidden" name="label-dmform-2" id="1316961645" class="" value="Phone"/>
   </div>
   <div class="dmforminput small-12 dmRespDesignCol medium-6 large-6 required" id="1547599130" localization_key_label="templates.custom.280">
    <label for="dmform-5" id="1480792169" class="" hide="true">
     Email
    </label>
    <input type="email" name="dmform-5" placeholder="Email" id="1853964912" class="" localization_key_placeholder="templates.custom.77"/>
    <input type="hidden" name="label-dmform-5" id="1141862710" class="" value="Email"/>
   </div>
   <div class="dmforminput large-12 medium-12 dmRespDesignCol small-12 required" id="1325725782" localization_key_label="templates.custom.280">
    <label for="dmform-3" id="1018694168" class="" hide="true">
     Message
    </label>
    <textarea name="dmform-3" id="1220739256" class="" placeholder="Message">
    </textarea>
    <input type="hidden" name="label-dmform-3" id="1327103965" class="" value="Message"/>
   </div>
   <span id="1028713084" class="dmWidgetClear" dmle_clear="true">
   </span>
   <div class="dmformsubmit dmWidget R" preserve_css="true" id="1144498594">
    <input class="" name="submit" type="submit" value="SUBMIT" id="1764241335" localization_key_value="templates.custom.281"/>
   </div>
   <input name="dmformsendto" type="hidden" preserve_css="true" id="1078977250" class="" value="xxx@example.com,yyy@example.com"/>
   <input class="dmActionInput" type="hidden" name="action" value="/_dm/s/rt/widgets/dmform.submit.jsp" id="1194625447"/>
   <input name="dmformsubject" type="hidden" preserve_css="true" id="1273943423" class=""/>
  </form>
</div>
<div class="dmform-success" style="display:none" preserve_css="true" id="1710478744" localization_key="templates.custom.282">
  Thank you for contacting us.
  <br id="1591989592"/>
  We will get back to you as soon as possible
</div>
<div class="dmform-error" style="display:none" preserve_css="true" id="1926700593" localization_key="templates.custom.283">
  Oops, there was an error sending your message.
  <br id="1360556738"/>
  Please try again later
</div>
</div>
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Oct 12 2020, 05:59 PM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



There must be more to it. I don't see how this form can do anything at all. The spam bots will have a feast with those embedded email addresses though!

What is used as subject? The id 1273943423? Maybe JavaScript can be used to inject something more. Question is if the script that handles this will accept that.

The easiest solution is probably that your client turns threading off in GMail. Or uses something other than GMail.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
ImNerdy
post Oct 13 2020, 09:11 AM
Post #3





Group: Members
Posts: 2
Joined: 12-October 20
Member No.: 27,590



QUOTE(pandy @ Oct 12 2020, 05:59 PM) *

There must be more to it. I don't see how this form can do anything at all. The spam bots will have a feast with those embedded email addresses though!

What is used as subject? The id 1273943423? Maybe JavaScript can be used to inject something more. Question is if the script that handles this will accept that.

The easiest solution is probably that your client turns threading off in GMail. Or uses something other than GMail.


Oops. No way for me to edit the emails out of the post?

The submission subject right now is blank, but it goes in as a plain text from a field in the widget that I fill out during set up. If I don't put anything in that box, it just says "Form Message". Best I can gather is that I'm only able to edit a portion of the code since it's a build in Duda widget.

This post has been edited by ImNerdy: Oct 13 2020, 09:13 AM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Oct 13 2020, 09:18 AM
Post #4


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



QUOTE(ImNerdy @ Oct 13 2020, 04:11 PM) *

Oops. No way for me to edit the emails out of the post?


Only for one hour. But I can edit it for you. I didn't bother before because they can get the email addresses from you site as well.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
aSquirl
post Mar 19 2023, 02:57 PM
Post #5





Group: Members
Posts: 1
Joined: 19-March 23
Member No.: 28,860



I've been looking into sending email to an arbitrary email included in the form and I found this thread! Not a lot of users looking into custom form features that I can find.

I've found that when copying out of the customize HTML/CSS feature for the widget, the email recipient address is plain text, but in practice once the page is live there's some sort of hashing that obfuscates the address.

Pandy is right, you'll probably need to write some custom Javascript/jQuery based code. If you're wanting the email address added to the end of the subject you might try this code:

QUOTE
$('name="dmform-5"').change(function() {
$('name="dmformsubject"').val( $('name="dmformsubject"').val + " " + $('name="dmform-5"').val());
});
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 28th March 2024 - 10:49 AM