Hi Yaron,
 
I tried to dig through your code a bit more...
 
Wouldn't specials/SF_AddData.php be the better place?
after the call to formHTLM():
...
list ($form_text, $javascript_text, $data_text, $form_page_title, $generated_page_name) = $sfgFormPrinter->formHTML($form_definition, $form_submitted, $page_is_source, $page_contents, $page_title, $page_name_formula);
  if ($form_submitted) {
...
 
now $generated_page_name should have all values replaced from the inputs besides the <unique number> tag, correct?
If I pass this string through the parser, shouldn't that do the trick?
 
Robert Michel

From: Yaron Koren
Sent: Monday, August 17, 2009 3:26 PM
To: Robert Michel
Cc: semediawiki-user@lists.sourceforge.net
Subject: Re: [Semediawiki-user] [SF] Using Parser functions for generating page titles in the one-step-process

Hi,

That's an interesting idea. You could probably do it by adding a line like you mentioned in the previous email, to the section of /includes/SF_FormPrinter.inc where the variable $generated_page_name gets set.

-Yaron

On Mon, Aug 17, 2009 at 7:06 AM, Robert Michel <xologrim@hotmail.com> wrote:
Hi,
 
when using the one-step-process to add data with forms the page name is created using a statement like
 
{{{info|page name=<templatename[field 1]><templatename[field 2]>...<templatename[field n]}}}
 
Now I want to put the title together based on what data was entered for the different fields, e.g. "if <field 1> is not empty use <field 1> else <field 2>", which could be easily done by parser functions:
 
{{{info|page name={{#if:<templatename[field 1]>|<templatename[field 1]>|<templatename[field 2]>}}... }}}
 
currently that seems to be not possible. My idea would be to pass the string to the parser once the placeholders for the values are replaced by the actual inputs.
 
Does that make sense? Or are there other methods to achieve that?
Where would I have to change the code?
 
Thanks,
 
Robert Michel

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Semediawiki-user mailing list
Semediawiki-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-user