Tags:
create new tag
view all tags

SID-00383: How to add a form with mandatory fields to a template

Status: Answered Answered TWiki version: 4.3.1 Perl version: unknown
Category: CategoryForms Server OS: unknown Last update: 16 years ago

I've been diving into TWikiForms - adding some mandatory fields on the UserForm. Before changing things for everyone (in Main) I decided to get things working in the Sandbox first.

Per the recommended approach I copied UserForm and NewUserTemplate, tweaked the UserForm, edited NewUserTemplate with ?formtemplate=Sandbox.UserTemplate

OK, so far so good - the NewUserTemplate now has the new UserForm on it.

Here's my problem; in order to be able to SAVE the template NewUserTemplate, I had to enter in initial values for those mandatory fields.

Unfortunately, that means that all the mandatory fields now have "initial values" instead of being empty. That's not what I need; all those mandatory fields should initially be empty, so the user must complete them in order to register.

I'm sure people have run into this problem before, with mandatory fields and templates... how to get around this, and get empty values into the template, even though the fields are mandatory?

-- PaulReiber - 2009-06-23

Discussion and Answer

I run into the same issue before. There is currently no way to give the templates "special treatment". It would be a useful enhancement though.

Workaround: As an administrator you can edit a template page with a cmd=repRev URL parameter. That allows you to tweak the content of a page without bumping up the page revision. You will see and can edit the meta data. Simply remove the mandatory form field value and save the page. Attention: Use this feature with care: You could damage the meta data, and you could lose faith of the users if this admin power is abused.

-- PeterThoeny - 2009-06-23

readers please note what eventually worked for me was an edit with the addition of ?cmd=repRev on the URL line - that's with the first R lower-case.

-pbr

-- PaulReiber - 2009-06-23

My bad, I fixed the command to show the proper capitalization.

-- PeterThoeny - 2009-06-23

      Change status to:
ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
SupportForm
Status Answered
Title How to add a form with mandatory fields to a template
SupportCategory CategoryForms
TWiki version 4.3.1
Server OS unknown
Web server unknown
Perl version unknown
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2009-06-23 - PeterThoeny
 
  • 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-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.