-
maidbrightAsked on September 29, 2023 03:41 PM
Hi,
We do have a booking form that is integrated with salesforce and Authorize.Net.
I was able to hide billign address fields with some CSS codes.(the reason for hiding the fields is to make the booking experience much faster) However, our salesforce org requires billing address fileds to create the transaction records properly. Is there a way to automatically populate the billing address fields?
I have included the page link.
-
Ryan JotForm SupportAnswered on September 29, 2023 05:58 PM
Hi maidbright,
Thanks for reaching out to Jotform Support. Unfortunately, it is not possible to automatically populate the Billing Address in your Authorize.net integration. It is also not possible to pass the values from an Address field to the Billing Address as conditions only work with the other form fields. This is due to security reasons.
You might also want to check out the Most FAQs about Authorize.net.
Reach out again if you have any other questions.
-
Kylie_Weeks_tannaowens6Answered on September 30, 2023 05:41 AM
If you have a booking form integrated with Salesforce and Authorize.Net, and you need to hide the billing address fields for a faster booking experience but still require them to create transaction records properly in Salesforce, you can consider implementing the following solution:
1. Use JavaScript to Populate Billing Address Fields:
You can use JavaScript to automatically populate the billing address fields on the form before submitting the data to Salesforce and Authorize.Net. Here's a general outline of how you can achieve this:
When the user submits the booking form, trigger a JavaScript function that collects the necessary billing address information. This information might come from other form fields or user inputs.
Use JavaScript to populate the hidden billing address fields with the collected data.
Ensure that the data format and structure match the requirements of Salesforce and Authorize.Net for proper transaction record creation.
Here's a simplified example using JavaScript and HTML:
<form id="bookingForm">
<!-- Other form fields -->
<!-- Hidden billing address fields -->
<input type="hidden" id="billingStreet" name="billingStreet" />
<input type="hidden" id="billingCity" name="billingCity" />
<input type="hidden" id="billingState" name="billingState" />
<input type="hidden" id="billingZip" name="billingZip" />
<button type="button" onDISABLEDclick="populateBillingAddress()">Submit</button>
</form>
<script>
function populateBillingAddress() {
// Collect billing address information from other form fields or user inputs
var billingStreetValue = document.getElementById("billingStreetInput").value;
var billingCityValue = document.getElementById("billingCityInput").value;
var billingStateValue = document.getElementById("billingStateInput").value;
var billingZipValue = document.getElementById("billingZipInput").value;
// Populate the hidden billing address fields
document.getElementById("billingStreet").value = billingStreetValue;
document.getElementById("billingCity").value = billingCityValue;
document.getElementById("billingState").value = billingStateValue;
document.getElementById("billingZip").value = billingZipValue;
// Submit the form to Salesforce and Authorize.Net
document.getElementById("bookingForm").submit();
}
</script> wellstar smart square
In this example, when the user clicks the "Submit" button, the populateBillingAddress() JavaScript function collects the billing address information from other form fields or inputs and populates the hidden billing address fields. The form is then submitted to Salesforce and Authorize.Net with the populated data.
This approach allows you to hide the billing address fields for a faster booking experience while still ensuring that the necessary billing address data is included in the transaction records created in Salesforce.
-
maidbrightAnswered on October 02, 2023 10:50 AM
This is perfect.
Id like the billing info to copy the values of address fields on the form. How can i reference the address fields?
Thank you.
-
Ryan JotForm SupportAnswered on October 02, 2023 11:31 AM
Hi maidbright,
Thanks for getting back to us. The guide provided above may only be possible if you get the Full Source Code of your form and add the code. We have a guide about How to Get the Full Source Code of Your Form that you can check out. Please note that the Full Source Code file needs to be hosted on your Web Server.
You might also want to check out this guide about Document: getElementById() method.
Reach out again if you have any other questions.