and "On Submit code - after sending email:"Your fishing location has been submitted!Once approved by an administrator, your marker will be visible on the fishing locations map.{Go Back To Fishing Locations}  "> How to migrate a form from V 3.2 to V 4? - Forums

Forums

How to migrate a form from V 3.2 to V 4?

yaksushi 15 Mar, 2012
I have a form that users use to submit locations from google maps. I see where I can copy the custom html code from the V3.2 to the new V4 chronoforms but not sure where to put the code that is in "On Submit code - before sending email:"
<?php
$hidden_2 = JRequest::getString('hidden_2', '', 'post');
$hidden_3 = JRequest::getString('hidden_3', '', 'post');
$hidden_4 = JRequest::getString('hidden_4', '', 'post');
$hidden_11 = JRequest::getString('hidden_11', '', 'post');
$hidden_12 = JRequest::getString('hidden_12', '', 'post');
$hidden_13 = JRequest::getString('hidden_13', '', 'post');
$latitude = JRequest::getString('latitude', '', 'post');
$longitude = JRequest::getString('longitude', '', 'post');
$location =& JRequest::getString('select_21','post');
$size =& JRequest::getInt('text_14', '', 'post');
$fish =& JRequest::getVar('check0', 'post');
$parking =& JRequest::getString('select_16','post');
$launch =& JRequest::getString('select_17','post');
$cart =& JRequest::getString('select_18','post');
$camp =& JRequest::getString('select_19','post');
$difficulty =& JRequest::getString('select_20','post');
$info =& JRequest::getString('text_18', '', 'post');
$name =& JRequest::getString('username', '', 'post');
$marker = "<strong>Size:</strong>".$size."<br />"."<strong>Target Fish: </strong>".$fish."<br />"."<strong>Parking: </strong>".$parking."<br />"."<strong>Launch Fees: </strong>".$launch."<br />"."<strong>Kayak Cart Needed: </strong>".$cart."<br />"."<strong>Camping Available: </strong>".$camp."<br />"."<strong>Difficulty: </strong>".$difficulty."<br />"."<strong>Info: </strong>".$info."<br />"."<strong>Submitted By: </strong>".$name."<br />"."<br />"."<br />"."<br />"."<strong>Satellite View: </strong>".$hidden_11.$latitude.$hidden_12.$longitude.$hidden_13."<br />"."<br />"."<br />"."<strong>Street View: </strong>".$hidden_2.$latitude.$hidden_3.$longitude.$hidden_4."<br />";
$marker1 = "<strong>Location: </strong>".$location."<br />"."<strong>Latitude: </strong>".$latitude."<br />"."<strong>Longitude: </strong>".$longitude."<br />"."<br />"."<br />";
$marker3 = "<strong>Location: </strong>".$location."<br />"."<strong>Latitude: </strong>".$latitude."<br />"."<strong>Longitude: </strong>".$longitude."<br />"."<br />"."<strong>{See More Details}</strong>"."<br />";
JRequest::setVar('description', $marker3);
JRequest::setVar('fulltext', $marker);
JRequest::setVar('introtext', $marker1);
?>

<?php
$api_AUP = JPATH_SITE.DS.'components'.DS.'com_alphauserpoints'.DS.'helper.php';
if ( file_exists($api_AUP))
{
require_once ($api_AUP);
AlphaUserPointsHelper::newpoints( 'plgaup_submit_fishing_location' );
}
?>

and
"On Submit code - after sending email:"
<p style="text-align: center;"><span style="font-size: 14pt;"><a href="/resources/our-maps/fishinglaunch-locations"><img alt="us_topography_snow_cont_sm" src="images/stories/demo/frontpage/us_topography_snow_cont_sm.jpg" width="250" height="157" /></a></span></p>
<p style="text-align: center;"><span style="font-size: 12pt;">Your fishing location has been submitted!</span></p>
<p style="text-align: center;"><span style="font-size: 12pt;">Once approved by an administrator, your marker will be visible on the fishing locations map.</span></p>
<p style="text-align: center;"><span style="font-size: 12pt;"><a href="/resources/our-maps/fishinglaunch-locations">{Go Back To Fishing Locations}</a><br /></span></p>
<span style="font-size: 12pt;"> </span>
<p style="text-align: center;"><span style="font-size: 12pt;"><br /></span></p>
<span style="font-size: 12pt;"> <a href="/resources/our-maps/fishinglaunch-locations"></a></span>
GreyHead 15 Mar, 2012
Hi yaksushi,

Drag Custom Code actions into the On Submit event an move them to the place in the action sequence where you want the code to run.

Bob
This topic is locked and no more replies can be posted.