Hi again,
im really sorry to jump in on this thread again but ive been really trying and still cannot seem to get this working?
im new to php, trying to learn my way through it but dont know enough to know why this isnt working, every change ive tried has failed.
i tried to do exactly as you said Breezer
adding
<?php
$data=$_POST['data'];
$output ='';
if(!$data){
$output .='<form method="post" action="[~192~]" id="Form">
<input type="text" name="data" id="data" />
<input type="submit" value="Submit" />
</form>';
}else{
// Set placeholders:
$DataArray = array(
'data' => $data
);
// Return the chunk
$output .= $modx->parseChunk('PostDataTestChunk', $DataArray, '[+', '+]');
}
unset($data);
return $output;
?>
to a snippet called "showData"
which should pass the data array to a chunk called /* this snippet would call a chunk named "PostDataTestChunk"
which contains
so that my page with [!showData!] gets redirected to a page that has{PostDataTestChunk} but still the value for my form field data remains blank
im not sure what to do/try next?