We relaunched the TWiki.org project with an expanded TWiki charter, and we invite you to participate! The TWiki.org Code of Conduct agreement took effect on 27 Oct 2008. We ask existing twiki.org users to opt-in. You need to opt-in to participate in the Blog, Codev, Plugins and TWiki webs. -- PeterThoeny - 27 Oct 2008
Tags:
create new tag
, view all tags

Question

I am aiming the following objective:

  • r1: Create a child topic to an existing one
  • r2: Use a template for the child topic
  • r3: Display the form directly in the parent topic, with the form attribute data field of the child
  • r4: Allow select dropdown and radio buttons, ...in the form
  • r5: Add the child topic, refresh the parent topic and stay in the parent topic view mode.

I used the CommentPlugin? template to create fancy exemples. They all included comments in the parent child. Now I want to reach the above objectives with the topic creation of a child. I admit having no experience in the css technologies and related element, but I was able to come with this half working layout:

<form method="post" action="%SCRIPTURL{save}%/Main/" enctype="application/x-www-form-urlencoded" name="noformcomment0" id="noformcomment0">
<input type="hidden" name="topicparent" value="%TOPIC%" />
<input type="hidden" name="comment_action" value="save" />
<input type="hidden" name="nonwikiword" value="off" />
<input type="hidden" name="onlywikiname" value="on" />
<input type="hidden" name="templatetopic" value="EvenementTemplate" />
<div class="twikiFormSteps">
<div class="twikiFormStep">
*Name of event:* %BR%
<input class="twikiInputField" %DISABLED% type="hidden" size="40" name="topic" id="topic" value="EVnT%SERVERTIME{$dayx$monthx$yearx$houx$sec}%" /> <span class="twikiGrayText"> </span>
<input class="twikiInputField" %DISABLED% type="hidden" size="40" name="Date" id="Date" value="%DATE%" /> <span class="twikiGrayText"> </span>
<input class="twikiInputField" %DISABLED% type="hidden" size="40" name="Hour" id="Hour" value="%GMTIME{"$hours:$minutes:$seconds"}%" /> <span class="twikiGrayText"> </span>
</div>
<div class="twikiFormStep twikiLast">
*Topic text:* %BR%
%COMMENT{noform="on" button="Save event"}%
</div>
</div>
</form>

I think I understand the

  • twikiFormStep,
  • twikiLast,
  • twikiFormSteps and
  • twikiInputField
elements but I am confused between this comment layout and the ones in the UserCommentTemplate? topic. I admit not being able to manipulate the div and class keywords, and acheived the above by copy paste try and error. I am not able to fulfill the requirements r4 and r5. I think I am only missing some lines like
  <input class="twikiInputField" %DISABLED% type="text" ...
  <input class="twikiInputField" %DISABLED% type="select" ...
  <input class="twikiInputField" %DISABLED% type="radio" ...
and some a kind of line like
   redirect...
Thanks for your help

Environment

TWiki version: TWikiRelease04x02x00
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Debian
Web server: Apache
Perl version: ?
Client OS: Windows XP
Web Browser: Firefox
Categories: Forms

-- AlainLavoieDexto - 17 Aug 2008

Answer

ALERT! If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list below the edit box.

 
Change status to:
Topic revision: r2 - 23 Sep 2008 - 13:31:03 - AlainLavoieDexto
 
TWIKI.NET
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback