• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Pagebreak - Write/Post/Save data on next

Pagebreak - Write/Post/Save data on next 11 years 1 month ago #27091

  • info892
  • info892's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
I need to write/post/save the data on the first page of the pagebreak pages, so that I can see what the user has entered even if they then do not proceed with the submit on page 2. I considered running an onclick trigger which will write the data to a text file on server, but are concerned about security. If possible, perhaps the data can be stored in submissions, but to a different form? and then will also store all data found on page and 2 on submit to current form submissions? i don't know.....

Page 1 has over 100 fields.

Please help, what functions does rsformPRO offer to save page 1 data?

Thank you in advance!
The administrator has disabled public write access.

Pagebreak - Write/Post/Save data on next 11 years 1 month ago #27099

  • info892
  • info892's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
I have managed to write all he values to a text file, but this only happens if I submit on page 2. I really need to get the first fieldset data to be passed seperatly as well on next page change.

How can i modify the below code perhaps?

$file = JPATH_SITE.'/tmp/'.uniqid('page1').'.txt';

$data = '';

foreach ($_POST as $name => $value) {

if (is_array($value)) {
$value = implode(', ', $value);
}

$data .= "$name=$value\r\n";
}

file_put_contents($file, $data);

$adminEmail[] = $file;
The administrator has disabled public write access.

Pagebreak - Write/Post/Save data on next 11 years 1 month ago #27120

  • info892
  • info892's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
k, here we go:

js.
$(function(){
$('#sendNext').click(function(e) {
				      setTimeout(function(){
		var form = $('#userForm');
		var post_data = form.serialize();
		$.ajax({
			type: 'POST',
			url: 'email/process.php', 
			data: post_data
		});
		      },5000);
	});
});

and then your php.
$toemail = 'email-address';
$data = '';
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
foreach($_POST['form'] as $name=>$value){
  if(is_array($value)) $value = implode(',',$value);
    if($value > '0'){
    $data .= '{'.$name.':'.$value.'}'.'<br/>';
    }
}
 
mail($toemail, 'Estimate', $data, $headers)

thank you very much for ALL the help?
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!