Hi,
you can do it to modify generated
..._inline_edit.php/..._inline_add.php files manually (add refreshing after adding new record).
However we don't have a ready to go solution for this.
Jane:
Thanks for the response. As I suspected this would need to be done in the php file. My question is, can I use the inline_add template file to do this(adds the necessary code in the list template file) ? Where I'm struggling is where is the output going. I've got everthing fine up to the point I try to show the output. I added this code to the following if statement:
if ( $_REQUEST["a"]=="edited" && $inlineedit )
{
echo "<textarea id=\"data\">";
if($IsSaved)
{
if($HaveData)
echo "saved";
else
echo "savnd";
print_inline_array($showKeys);
echo "\n";
print_inline_array($showValues);
echo "\n";
print_inline_array($showFields);
echo "\n";
print_inline_array($showRawValues);
echo "\n";
print_inline_array($showDetailKeys,true);
echo "\n";
print_inline_array($showDetailKeys);
$fh = fopen("/tmp/PrintLine.txt", "w+");
fwrite($fh, "\nShow Keys\n");
foreach ( $showKeys as $key=>$val )
// echo str_replace(array("&","<","\\","\r","\n"),array("&","<","\\\\","\\r","\\n"),str_replace(array("\\","\r","\n"),array("\\\\","\\r","\\n"),$val))."\\n";
fwrite($fh, str_replace(array("&","<","\\","\r","\n"),array("&","<","\\\\","\\r","\\n"),str_replace(array("\\","\r","\n"),array("\\\\","\\r","\\n"),$val))."\\n");
fwrite($fh, "\nShow Values\n");
foreach ( $showValues as $key=>$val )
// echo str_replace(array("&","<","\\","\r","\n"),array("&","<","\\\\","\\r","\\n"),str_replace(array("\\","\r","\n"),array("\\\\","\\r","\\n"),$val))."\\n";
fwrite($fh, str_replace(array("&","<","\\","\r","\n"),array("&","<","\\\\","\\r","\\n"),str_replace(array("\\","\r","\n"),array("\\\\","\\r","\\n"),$val))."\\n");
fwrite($fh, "\nShow Fields\n");
foreach ( $showFields as $key=>$val )
// echo str_replace(array("&","<","\\","\r","\n"),array("&","<","\\\\","\\r","\\n"),str_replace(array("\\","\r","\n"),array("\\\\","\\r","\\n"),$val))."\\n";
fwrite($fh, str_replace(array("&","<","\\","\r","\n"),array("&","<","\\\\","\\r","\\n"),str_replace(array("\\","\r","\n"),array("\\\\","\\r","\\n"),$val))."\\n");
fwrite($fh, "\nShow Raw Values\n");
foreach ( $showRawValues as $key=>$val )
// echo str_replace(array("&","<","\\","\r","\n"),array("&","<","\\\\","\\r","\\n"),str_replace(array("\\","\r","\n"),array("\\\\","\\r","\\n"),$val))."\\n";
fwrite($fh, str_replace(array("&","<","\\","\r","\n"),array("&","<","\\\\","\\r","\\n"),str_replace(array("\\","\r","\n"),array("\\\\","\\r","\\n"),$val))."\\n");
fwrite($fh, "\nShow Detail Keys\n");
foreach ( $showDetailKeys as $key=>$val )
// echo str_replace(array("&","<","\\","\r","\n"),array("&","<","\\\\","\\r","\\n"),str_replace(array("\\","\r","\n"),array("\\\\","\\r","\\n"),$val))."\\n";
fwrite($fh, str_replace(array("&","<","\\","\r","\n"),array("&","<","\\\\","\\r","\\n"),str_replace(array("\\","\r","\n"),array("\\\\","\\r","\\n"),$val))."\\n");
fwrite($fh, "\n\n");
fclose($fh);
}
else
{
echo "error";
echo str_replace(array("&","<","\\","\r","\n"),array("&","<","\\\\","\\r","\\n"),$message);
}
echo "</textarea>";
}
else
{
if(function_exists("BeforeShowEdit"))
BeforeShowEdit($smarty,$templatefile);
$smarty->display($templatefile);
}
So when I call this code the text file has the edited record values as well as the auto generated record values, escaped properly to be inserted/displayed on the template file. I'm comfortable with the smarty calls as I've convinced myself by testing that I understand how they are working. Where my ignorance is killing me is that I assume the output is directed to the list template.
So it appears that I need to do something there, correct or incorrect ? If I send the output twice to the list template I'm going to see one record or the other, i.e.,, the values are being over written as they are passed a second time ? So can I use the list template with the add record and edit record capabilities to show both records after the user saves the edited record ? And if so how do I properly direct the output to the template. Or, am I totaly not seeing somehting ?????
Thanks,
Art
PS I have no problem hard coding the php files as I've written sets of perl scripts that post processes the output from phprunner making the changes transparent while generating a change log.