I recently created a couple of data forms for a customer to submit an order (one form is to order a sample product, the other is for a "real" order). After sorting out the permissions so anonymous users can save the forms and upload files, everything is working great.
I'm using tags to track the order status (i.e. _new, _inprocess, _completed). What I'm stuck on right now is that I'd like to somehow create an "administrative notes" field in the form so that the site admins can enter specific notes about the status of the order beyond the tags. I was hoping for some clever use of CSS to hide the field from customers and only display it for site admins when editing the form. Since I wasn't able to figure that out, I ended up using per page comments to accomplish this. With proper permissions and some CSS tweaks I was able to hide the per page comments from customers. This works OK, but I'd really prefer to use a single form field to collect these notes.
As a side note, I came up with a "poor man's captcha" that some may find useful to prevent robots from filling out the forms and submitting them. It uses regular expressions to allow only specific text (e.g. "CONFIRM") and it effectively makes the field required and it won't save until the proper phrase is entered into the text box. I also used it as a means for the users to agree to the terms of the sample program.
terms:
label: Terms
type: static
value: The terms of the agreement go here...
acceptterms:
label: Type ACCEPT to agree to these terms
type: text
width: 10
match: /^ACCEPT/
Another thing I learned that I didn't realize is that you can use the [[module css]] inside an [[iftags]] block. There was one element of the comments module I could not hide from just customers (the "Add a New Comment" button), so I used the following code to toggle the display of the comments module #thread-container on and off:
[[iftags -_notes]]
[[module css]]
#thread-container {
display: none;
}
[[/module]]
[[/iftags]]
[[iftags +_notes]]
[[module css]]
#thread-container {
display: block;
}
[[/module]]
[[/iftags]]
[[button set-tags +_notes text="Show Order Status Notes" class="tag-buttons"]] [[button set-tags -_notes text="Hide Order Status Notes" class="tag-buttons"]]
It actually works quite well.
Has anyone run into a need like this and found a solution? Like I said, my current solution works fine, but my primary user would have an easier time editing a single form field for his notes.
I have relaxed permissions so Wikidot user can view page options and the source. My form template pages are here:
http://www.mascot-golf.com/orders:_template
http://www.mascot-golf.com/sample:_template
Thanks!









