cancel
Showing results for 
Search instead for 
Did you mean: 

DPM Method - x_exp_date entered as two fields

I’m using the DPM method.  Is it possible to split the x_exp_date HTML field into two fields (month and year) and combine them back on submittal. 

 

Since the DPM method doesn’t allow you to go back to the server, I’m hoping this can be accomplish with some java script before the page is submitted to Authorize.net.

 

Has anyone done this?

 

Thanks,

Scott 

swade
Member
2 REPLIES 2

Hey Scott,

 

I've never heard of anyone doing that, so I can't really give any advice here. I'd recommend subscribing to this topic so that you'll be alerted via email if anyone else from the community is able to respond with any feedback. To subscribe, click Topic Options at the top of this thread and then select Subscribe. You'll then receive an email once anyone replies to your post.

 

Thanks,

 

Michelle

Developer Community Manager

Michelle
All Star

How about something like this, executed from JavaScript on form submission:

 

 var oMonth = document.getElementById("Expiry_Month");
 var oYear = document.getElementById("Expiry_Year");
 var oExpiryDate = document.getElementById("x_exp_date");
oExpiryDate.value = oMonth.value + oYear.value;