Answers.Body: <p>Depending on how your redirect works, you can redirect and get the param in the template where the form is via:</p>
  
  <pre><code>{% set param_name = craft.request.param('param_name') %}
  </code></pre>
  
  <p>You can then set this param in your form template and post it to your action controller.</p>
  
  <pre><code>&lt;input type='hidden' name='param_name' value='{{ param_name }}' /&gt;
  </code></pre>
  
  <p>In your action controller you can retrieve it by getting it from the post.</p>
  
  <pre><code>$param_name = craft()-&gt;request-&gt;getPost('param_name');
  </code></pre>
  
  <p>Is this anything you can use? Or need? Good luck!</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-31T12:27:42.900Z
Answers.Text: Doesn’t solve my problem from the looks of it.
  
  Here’s an example:
  I have a job listing at www.example.com/designer and the user hits "apply" on that page. The user is then taken to a form. How can I know that the user came from www.example.com/designer and not www.example.com/developer?
Answers.UserDisplayName: Clint Tabone
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-31T12:32:27.057Z
Answers.Text: Can you edit your question with this new information, i will update my answer then.
Answers.UserDisplayName: Pim Kaptein
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-31T13:03:26.227Z
Answers.Text: @ClintTabone you would just append the param to the "apply" link like so: `<a href="apply?param_name={{ craft.request.firstSegment }}">Apply</a>`
Answers.UserDisplayName: carlcs
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-31T11:42:04.633Z
Answers.LastActivityDate: 2015-07-31T11:42:04.633Z
Answers.UserDisplayName: Pim Kaptein
Body: <p>Here’s an example: I have a job listing at www.example.com/designer and the user hits "apply" on that page. The user is then taken to a form. How can I know that the user came from www.example.com/designer and not www.example.com/developer?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-07-30T16:30:43.563Z
Comments.Text: Unless I'm misunderstanding, why wouldn't you just include that data as part of the form submission?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-07-31T09:35:18.953Z
Comments.Text: I think I didn’t explain clearly enough.
  
  Basically what I need is that when a user submits the form, I know which job post they wanted to apply for.
Comments.UserDisplayName: Clint Tabone
Tags: <form><php>
Title: How do I create a page with a dynamic id?
ThreadText: # How do I create a page with a dynamic id?
  
  (Asked by: username_0 on 2015-07-30)
  
  Here’s an example: I have a job listing at www.example.com/designer and the user hits "apply" on that page. The user is then taken to a form. How can I know that the user came from www.example.com/designer and not www.example.com/developer?
  
  **Tags:** form, php
  
  > **Comments:**
  > **username_1**: Unless I'm misunderstanding, why wouldn't you just include that data as part of the form submission?  
  > **username_0**: I think I didn’t explain clearly enough.  Basically what I need is that when a user submits the form, I know which job post they wanted to apply for.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2015-07-31. Score: 3 | Accepted answer
  
  Depending on how your redirect works, you can redirect and get the param in the template where the form is via:
  
  ```
  {% set param_name = craft.request.param('param_name') %}
  
  ```
  
  You can then set this param in your form template and post it to your action controller.
  
  ```
  <input type='hidden' name='param_name' value='{{ param_name }}' />
  
  ```
  
  In your action controller you can retrieve it by getting it from the post.
  
  ```
  $param_name = craft()->request->getPost('param_name');
  
  ```
  
  Is this anything you can use? Or need? Good luck!
  
  > **Comments:**
  > **username_0**: Doesn’t solve my problem from the looks of it.  Here’s an example: I have a job listing at www.example.com/designer and the user hits "apply" on that page. The user is then taken to a form. How can I know that the user came from www.example.com/designer and not www.example.com/developer?  
  > **username_2**: Can you edit your question with this new information, i will update my answer then.  
  > **username_3**: @username_0 you would just append the param to the "apply" link like so: `<a href="apply?param_name={{ craft.request.firstSegment }}">Apply</a>`  
  
  ---
  
  