Card Image

Request Received

	<!-- Do not remove this code. -->
	<style>
		tr,
		td {
			padding: 6px;
			border-spacing: 0px;
			border-width: 0px;
		}
	</style>
	<table style="
			width: 300px;
			background-color: #ffffff;
			background-color: white;
			color: black;
		">
		<tbody><tr>
			<td colspan="2" align="left" style="color: black; font-family: Arial; font-size: 14px">
				<strong>Thank you for your action</strong>
			</td>
		</tr>
		<tr style="display: none">
			<td>
				<span style="
						nowrap: nowrap;
						font-size: 12px;
						font-family: Arial;
						width: 200px;
						line-height: 22px;
					">Request ID<span style="color: red">*</span></span><br>
				<input type="text" maxlength="200" id="id" style="width: 250px" name="NAME">
			</td>
		</tr>
		<tr style="display: none">
			<td>
				<span style="
						nowrap: nowrap;
						font-size: 12px;
						font-family: Arial;
						width: 200px;
						line-height: 22px;
					">Next Action</span><br>
				<input style="display: none" id="res" name="COBJ3CF2" value="" type="text">
				<input style="display: none" id="COBJ3CF3" name="COBJ3CF3" value="" type="text">
				</td></tr><tr style="display: none">
					<td colspan="2" align="center" style="text-align: center; padding-top: 15px; font-size: 12px">
						<input style="font-size: 12px; color: white" id="formsubmit" type="submit" value="Submit">
						<input type="reset" name="reset" style="font-size: 12px; color: white" value="Reset">
					</td>
				</tr>
			
		
	</tbody></table>

	<script>
		var mndFileds = new Array('NAME');
		var fldLangVal = new Array('Request ID');
		var name = '';
		var email = '';

		//for setting and fetching the url parameter to the hidden req fields.
		let params = new URL(document.location).searchParams;
		let req_id = params.get('page_id');

		let NAME = params.get('NAME');
		document.getElementById('id').value = NAME;

		let type = params.get('Type');
		type = type.toLowerCase();
		if (type == 'quote') {
			type = 'Request a Quote';
		} else if (type == 'book') {
			type = 'Book a Handyman';
		}
		document.getElementById('COBJ3CF3').value = type;

		// settting the request type from response
		let res = params.get('res');
		res = res.toLowerCase();
		console.log(res);
		if (res == 'big') {
			document.getElementById('res').value = 'Big Job';
			alert('Thanks for your response. Big Job Quote');
			submitForm();
		} else if (res == 'offer') {
			document.getElementById('res').value = 'Offer Accept or Reject';
			alert('Thanks for your response. Offer Accept or Reject');
			submitForm();
		} else if (res == 'out_scope') {
			document.getElementById('res').value = 'Out of Scope';
			alert(
				'Thanks for your response. Request has been marked as Out of Scope. An email has been sent to the customer.'
			);
			submitForm();
		} else if (res == 'out_service') {
			document.getElementById('res').value = 'Job Outside Serviced Area';
			alert(
				'Thanks for your response. Request has been marked as Job Outside Service Area. An email has been sent to the customer.'
			);
			submitForm();
		} else if (res == 'lost') {
			document.getElementById('res').value = 'Lost Job';
			alert(
				'Thanks for your response. Request has been marked as  Lost Job. An email has been sent to the customer.'
			);
			submitForm();
		} else if (res == 'update_img') {
			document.getElementById('res').value = 'Update Image';
			alert(
				'Thanks for your response. Email sent to customer to Update Images'
			);
			submitForm();
		} else if (res == 'update_det') {
			document.getElementById('res').value = 'Update Details';
			alert(
				'Thanks for your response. An Email has been sent to Customer to update the job details'
			);
			submitForm();
		}

		function submitForm() {
			// var x = document.getElementsByTagName("form");
			var x = document.getElementsByName('WebForm3777011000001061947');
			x[0].submit(); // Form submission
		}

		function checkMandatory3777011000001061947() {
			for (i = 0; i < mndFileds.length; i++) {
				var fieldObj =
					document.forms['WebForm3777011000001061947'][mndFileds[i]];
				if (fieldObj) {
					if (fieldObj.value.replace(/^\s+|\s+$/g, '').length == 0) {
						if (fieldObj.type == 'file') {
							alert('Please select a file to upload.');
							fieldObj.focus();
							return false;
						}
						alert(fldLangVal[i] + ' cannot be empty.');
						fieldObj.focus();
						return false;
					} else if (fieldObj.nodeName == 'SELECT') {
						if (fieldObj.options[fieldObj.selectedIndex].value == '-None-') {
							alert(fldLangVal[i] + ' cannot be none.');
							fieldObj.focus();
							return false;
						}
					} else if (fieldObj.type == 'checkbox') {
						if (fieldObj.checked == false) {
							alert('Please accept  ' + fldLangVal[i]);
							fieldObj.focus();
							return false;
						}
					}
					try {
						if (fieldObj.name == 'Last Name') {
							name = fieldObj.value;
						}
					} catch (e) {}
				}
			}
			document.getElementById('formsubmit').disabled = true;
		}
	</script>
</form>

City Handyman acknowledges the Traditional Owners of the lands where we live, learn and work. We pay our respects to Elders past and present and celebrate the stories, culture and traditions of all First Nations people.