• 0

Need help combining inputs into one output for XML (code included)


Question

I am at the end of my rope here. I've tried everything I know how to do.

 

I have a webform that sends the information to Quickbase (a CRM). Everything works because the name"" in the input fields matches the data fields in the CRM. Except for four things:

• New Address Referring Agent Referring Company Agent Email

• All four of those SHOULD output into "_fid_12" which is Referral Notes field 12.

• So the variables aa through dd have been made, but still nothing transmits.

 

Please tell me what I'm missing. It's put me 5 days behind so far. Code is below (without the server sensitive data).

 

 <div id="desktop-contact-form">
    <div>   
        <form name="qdbform" method="POST" onsubmit="return validateForm(this)" encType="multipart/form-data" action="https://CRM-DOMAIN-APP-ROKEN-URL">
            <input type="hidden" name="fform" value="1">
            <table>
                <tr>
                    <td>First Name<span>*</span></td>
                    <td><input type="text" placeholder="Please enter you first name..." size="40" name="_fid_6" ></td>                      
                </tr>
                <tr>
                    <td>Last Name<span>*</span></td>
                    <td><input type="text" placeholder="Please enter your last name..." size="40" name="_fid_54" ></td>
                </tr>
                <tr>
                    <td>Phone<span>*</span></td>
                    <td><input type="text" placeholder="Please enter your phone..." size="40" name="_fid_25" ></td>
                </tr>
                <tr>
                    <td>Email<span></span></td>
                    <td><input type="text" placeholder="Please enter your email..." size="40" name="_fid_24" ></td>
                </tr>
                <tr>
                    <td>New Address<span></span></td>
                    <td><input type="text" rows="1" placeholder="Enter your new address..." size="50" name="dd" ></td>
                </tr>                                       
                <tr>
                    <td>Move In Date</td>
                    <td><input type="date" size="40" name="_fid_11" ></td>
                </tr>
                <tr>
                    <td>Specific Notes</td>
                    <td><textarea name="_fid_46" rows="2" cols="40"></textarea></td>
                </tr>
                <tr>
                    <td>Referral Agent Name<span></span></td>
                    <td><input type="text" rows="1" placeholder="Enter agent's full name..." size="40" name="aa" ></td>                     
                </tr>
                <tr>
                    <td>Referring Company<span></span></td>
                    <td><input type="text" rows="1" placeholder="Enter referring company name..." size="40" name="bb" ></td>                        
                </tr>
                <tr>
                    <td>Agent Email<span></span></td>
                    <td><input type="text" rows="1" placeholder="Enter agent email..." size="40" name="cc" ></td>                       
                </tr>
            </table>
            <input type="hidden" name="rdr" value="http://myfreeconnection.com/thank-you.html">
            <input type="hidden" name="_fid_12">
            <input type="submit" value="SUBMIT" class="btn">
        </form>     
        <p><strong>For Immediate Assistance, please call 877-528-3824</strong></p>
    </div>
</div>  
<!-- desktop contact form -->

    <!--======= ACCORDING =========-->      
    </div>
    <section class="padding-top-50 padding-bottom-30"></section>
<!-- </section> -->

    <!-- Work Process -->
    <div class="work-process">
      <ul class="row">

<!--======= FOOTER =========-->
<footer>
<div class="container"> 
    </div>
</footer>

<!--======= RIGHTS =========-->
<div class="rights">
<div class="container">
  <p>Copyright </p>
</div>
</div>
<script src="js/jquery-1.11.3.min.js"></script> 
<script src="js/bootstrap.min.js"></script> 
<script src="js/own-menu.js"></script> 
<script src="js/jquery.isotope.min.js"></script> 
<script src="js/jquery.lighter.js"></script> 
<script src="js/jquery.cubeportfolio.min.js"></script> 
<script src="js/owl.carousel.min.js"></script> 
<!-- SLIDER REVOLUTION 4.x SCRIPTS  --> 
<script type="text/javascript" src="rs-plugin/js/jquery.tp.t.min.js">        
</script> 
<script type="text/javascript" src="rs-plugin/js/jquery.tp.min.js">   
</script> 
<script src="js/main.js"></script>

<!-- added for contact form -->
<script lang="javascript">
function CheckForOther (item, origlen)
{
var sitem = item.options[item.selectedIndex];

if (item.selectedIndex == (item.length - 1))
    {
    var val = prompt ("ADD A NEW CHOICE:", "");

    if (val == null)
        item.selectedIndex = ;
    else    
        {
        var slen = item.length;

        if (slen == origlen+1){
            item.options[slen] = new Option (sitem.text, sitem.value);
                    }

        item.options[item.length-2].text = val;
        item.options[item.length-2].value = val;
        item.selectedIndex = item.length-2;
        }
    }
}
</script>
<script lang="javascript">
function validateForm()
{/*
if(theForm._fid_25.value == "")
{
alert('Please enter a value for the "Phone" field.');
theForm._fid_25.focus();
return (false);
}*/
var theForm=document.qdbform;
var a = theForm.aa.value;
var b = theForm.bb.value;
var c = theForm.cc.value;
var d = theForm.dd.value;
var rnote = "Referral Company: "+a+"\nReferral Agent: "+b+"\nAgent      
Email: "+c+"\nNew Address: "+d;
theForm._fid_12.value = rnote;
return true;
}
</script>

That's what I have, and it almost looks like "theForm._fid_12.value = rnote" should be different, but I don't know what else to do.

 

There are no other files on the server designating the process of things. All the code is written here. Please help. I'm desperate for this to start working.

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

After getting suggestions and different lines of code from other people, it almost feels like something is wrong on my end in Dreamweaver.

 

There are no other files in process here. Everything is inline. Could it be something in DW? I'm stumped.

Link to comment
Share on other sites

  • 0

I ran your code in a Chrome browser and it works.

 

I had to delete the CheckForOther function so maybe that's a clue

 

Otherwise it's a server issue

 

Also, it's been long time since I played with webby stuff but Multpart encoding doesn't seem right for a simple form...

 

Link to comment
Share on other sites

  • 0

Hmm, okay. I'll make the adjustment. I don't know what is causing such a hiccup. I'm going to have to create random fields in the CRM so I eliminate this multipart data and just make each field correspond with only one field in the CRM. Thank you for your input.

Link to comment
Share on other sites

  • 0

 

47 minutes ago, BlakeHammerton said:

Hmm, okay. I'll make the adjustment. I don't know what is causing such a hiccup. I'm going to have to create random fields in the CRM so I eliminate this multipart data and just make each field correspond with only one field in the CRM. Thank you for your input.

Multipart is normally used for file transfer uploads. Simple form whatver is in it is just a single transmission.

 

 

Link to comment
Share on other sites

This topic is now closed to further replies.