archive_me1Add my vote for this tag create new tag
, view all tags
At the moment if you specify both a formtemplate and a templatetopic in a save, then the form values in the query will not be inserted into the newly created form. This makes it had for a TWikiApplication that wants to create a topic from a template and populate the form in one hit. The relevant code fragment is in TWiki/UI/Save.pm:

    # Expand field variables, unless this new page is templated
    TWiki::Form::fieldVars2Meta( $webName, $query, $meta ) unless $templatetopi

Does anyone have any idea why this condition is there? I have removed it in DEVELOP, and everything works nicely, but it was presumably there for a reason. If it's good I can always put the condition back again.

-- CrawfordCurrie - 11 Mar 2005

I have also experimented in my installation with removing those lines. I think we need to document the algorithm of initialization of forms. As you know, forms can get values from

  • URL parameters
  • template topic
  • form default values

In FormValuesPassedInURLRequireText I have proposed the following order and priorities of intialization:

  1. If a value was passed in by a corresponding query parameter, that value should be taken, else
  2. If there is a templatetopic and there is a corresponding field value, that value should be taken, else
  3. If there is an initialization value defined in the formtemplate, that value should be taken, else
  4. The field value should be empty.

The patch at FormValuesPassedInURLRequireText implements that algorithm and is in DevelopBranch.

-- ThomasWeigert - 11 Mar 2005

I'm currently trying to figure out current status of direct-save feature (see notes in SaveContentWithoutEditContinued) and have not been able to get the form template part of to work at all. I've even been able to find notes about how to use it. Specifically, I'm wondering what one is suppose to reference with formtemplate=. The form definition topic? Thanks for any clarification.

-- LynnwoodBrown - 10 Jun 2005

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2008-08-28 - TWikiJanitor
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.