# Can I use  \<?php get\_post\_custom\_values($key); ?\> to populate a (hidden) form field in Mautic

**URL:** https://forum.mautic.org/t/can-i-use-php-get-post-custom-values-key-to-populate-a-hidden-form-field-in-mautic/6857
**Category:** Product Support
**Created:** [December 15, 2016, 3:48am UTC](https://forum.mautic.org/t/can-i-use-php-get-post-custom-values-key-to-populate-a-hidden-form-field-in-mautic/6857 "2016-12-15T03:48:50Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![DutchAlfred](https://avatars.discourse-cdn.com/v4/letter/d/aca169/32.png) [@DutchAlfred](https://forum.mautic.org/u/DutchAlfred)
#### Post date: [December 15, 2016, 3:48am UTC](https://forum.mautic.org/t/can-i-use-php-get-post-custom-values-key-to-populate-a-hidden-form-field-in-mautic/6857/1 "2016-12-15T03:48:50Z")

</div>

I want to make use of the same form on different pages of my website, but send a slightly different email depending on the page where the form was submitted. Therefore I want to populate a Mautic form field with a specific custom field value that I have on each page of my Wordpress website.  
  
  
  
How do I do this? Or is there another way to achieve the same goal?  
  
  
  
And perhaps more simple: how do I get the URL of the page on which the form was submitted into a form field?

---

<div class="post-metadata">

### Author: ![DutchAlfred](https://avatars.discourse-cdn.com/v4/letter/d/aca169/32.png) [@DutchAlfred](https://forum.mautic.org/u/DutchAlfred)
#### Post date: [December 15, 2016, 3:48am UTC](https://forum.mautic.org/t/can-i-use-php-get-post-custom-values-key-to-populate-a-hidden-form-field-in-mautic/6857/2 "2016-12-15T03:48:50Z")

</div>

I want to make use of the same form on different pages of my website, but send a slightly different email depending on the page where the form was submitted. Therefore I want to populate a Mautic form field with a specific custom field value that I have on each page of my Wordpress website.

How do I do this? Or is there another way to achieve the same goal?

And perhaps more simple: how do I get the URL of the page on which the form was submitted into a form field?
