Simple URL Builder Form

Job ID: 31347316

Budget: $30 – $250 USD

Summary:

Very simple single html/php page. The purpose of the page is to have a series of form fields and conditional form fields that will generate a URL based upon input parameters. This page does not need any design elements.

Functional Details (Case Story)

A user visits a webpage that has a form.

Radio buttons:
Batch
Normal

If "Batch" is selected:
The following form elements are visible:
Video URL (this form accepts a URL from YouTube, validated URL)
URL Text (text field)
Submit
(all fields are required)

If "Normal" is selected:
The following form elements are visible:
Email (validated email address)
Video URL (this form accepts a URL from YouTube, validated URL)
URL Text (text field)
Submit
(all fields are required)

User submits the validated fields.

The goal is to construct a new URL based upon the validated submission data.
There will be a variable $baseUrl that could be like: http://myco.com

and if, "Batch" is selected a URL will be constructed as such:
http://myco.com?e={{email}}&v=jMEoWm__Chc where e is always {{email}} and v is always the VideoID from the YouTube Video.

if "Normal" is selected, a URL will be constructed as such:
http://myco.com?e=$_GET['email']&v=jMEoWm__Chc where e is the submitted, validated email and v is always the VideoID from the YouTube Video.

The page printout should present the constructed URL as follows:

<a href="http://myco.com?e=$_GET['email']&v=jMEoWm__Chc">URL Text</a> <button>Copy To Clipboard</button>
where a link is presented with the chosen URL and the URL text submitted, plus an option to copy this to clipboard.

Example:

Click Here [Copy to Clipboard]

Which, when pasted (into email) would copy a link "Click Here" with the URL as described above.

In addition, below that
the URL itself will be visible in full, with an option to [Copy to Clipboard]

Requirements

Jquery is allowed/as is pure Javascript
PHP is required as the scripting language
HTML 5 validation
Related categories: PHP JavaScript HTML5 HTML jQuery