I've got a credit card form and on submission it requires that the expiry date is submitted from a single string as mmyy. Instead, the form is mm and yy in separate submission boxes.
I figured it would be possible to take the two value's and combine them by sitcking them into a hidden field.
I found a script online and due to my very limited knowledge of javascript I wouldn't actually know what to do with this and it looks looks somewhat incomplete:
Then call the function with onchange on your lastname field <input ID="LastName" value="" onChange="populate()"
I'm completely full of cold at the moment so my brains not firing on all thrusters.
Would this require any library like jquery to work?
If there's a way to do this without javascript that would be even better. Thing is as the forms being submitted via a thirdparty api I don't have the luxury of combining them via PHP at form submission.
Does anyone know how the Ghostery extension works in Google Chrome? I switched to that quite a while ago, from uBlock Origin after uBlock started having issues just working. Personally I love Ghostery and I think it does a fantastic job, and I really enjoy the whitelist I have built up as well for tons of websites that don't serve ads so that it isn't blocking good elements of them by accident.
>pointed to a British firm called SafeToNet
There it is. Some UK MP's brother/friend/spouse owns this shitware company and wants those kickbacks right into their own pocket.
DNS based blocking only works as long as the ads are served from hosts than the content. Closing that loophole would be pretty easy. I'd say it sits in a sweet spot of being just nerdy enough that the average person doesn't set it up, meaning it isn't really on the big companies' radars.
Question
Axel
I've got a credit card form and on submission it requires that the expiry date is submitted from a single string as mmyy. Instead, the form is mm and yy in separate submission boxes.
I figured it would be possible to take the two value's and combine them by sitcking them into a hidden field.
I found a script online and due to my very limited knowledge of javascript I wouldn't actually know what to do with this and it looks looks somewhat incomplete:
I'm completely full of cold at the moment so my brains not firing on all thrusters.
Would this require any library like jquery to work?
If there's a way to do this without javascript that would be even better. Thing is as the forms being submitted via a thirdparty api I don't have the luxury of combining them via PHP at form submission.
Appreciate any help.
Many thanks.
Alex
Link to comment
https://www.neowin.net/forum/topic/1133384-javascript-combine-2-form-fields-into-one/Share on other sites
8 answers to this question
Recommended Posts