Sometimes you may need to use Hidden Field in Contact Form 7 to get the URL of the Post or page where the form is used.
I have used [hidden url] as field field (screenshot below), to get the URL of the page I used the form.


At last, use this JQuery code to get the URL value Automatically
<script>
jQuery(document).ready(function(){
var url = window.location.href;
console.log("url"+url);
jQuery('input.wpcf7-form-control.wpcf7-hidden').attr("value",url) ;
});
</script>
Hello,
Kindly provide us with the price quote for the items below at your earliest convienence
HP 507A Cyan Toner Cartridge (CE401A) —————10 pcs
HP 507A, Magenta Original Toner Cartridge (CE403A) ———————10pcs
HP 507A, Yellow Original Toner Cartridge (CE402A) —————————10pcs
HP 507A, Black Original Toner Cartridge (CE400A) ——————————10pcs
Payment : Net 30
Quotation must be submitted on or before 10/30/2020 .Quotes after due date may not be accepted.
Esther Schneider
Manager, Strategic Sourcing
DuPont de Nemours, Inc.
LikeLike
would you mind to add me in skype in om2000_cuet please
Regards
Om
LikeLike
Where are you suppose to add the JQuery code?
LikeLike
Hi
you can use simple custom css and js plugins to add the jquery code
LikeLike
Thanks! Adding to the section worked.
LikeLike
Can we use value=”_url” there?
LikeLike
have u checked using that?
LikeLike