Bug 14898
Summary: | need way to prepopulate checkbox and multi-select fields on error | ||
---|---|---|---|
Product: | Red Hat Web Site | Reporter: | Maraya Cornell <maraya> |
Component: | Other | Assignee: | Tom Lancaster <tlancast> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Paul Lindner <plindner> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | current | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
URL: | http://www.redhat.com/strategicservices/contactform/ | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2000-08-11 23:20:22 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Maraya Cornell
2000-07-31 18:01:18 UTC
Tom, a hint from the modperl list.... See me about a way to use this idea with nifty Apache::ASP custom tags.. There is the HTML::FillInForm module that will pre fill your forms. It is pure Perl. It seems to work well, haven't stress tested it yet. I am using it in conjunction with Apache::ASP, but haven't hacked the Apache::ASP module to include it as a function. It is much easier to work with now that Joshua has added the $Response->TrapInclude function (thank you). I just keep my form in an include file, read it in to my script/page with the $Response->TrapInclude then send the it through HTML::FillInForm with my values I want in the form. This is all it takes - use HTML::FillInForm; my $fif = new HTML::FillInForm; my $html = $Response->TrapInclude('dbd_form.inc'); my $output = $fif->fill(scalarref => $html, fdat => \%form_content); print "$output"; Fixed this using the Module Paul recommended HTML::FillInForm, though it needed some patching to work properly on upper case HTML and checkboxes. The new custom tag which should be used for forms needing this functionality is <Apps:fillin></Apps:fillin>. This should surround the <form></form> tags. I have applied this to the pages in apps/response ( the oracle and IA64 contact forms ). I noticed in doing this that the checkboxes on oracle_81contact.html didn't appear to be right; there's a series of them with the same name and different values, a la radio button. I'm not sure you're supposed to do that with checkboxes. Correct me if I'm wrong, though. I'll submit a separate bug for that one. This isn't working for me. I've tried it with and without the perl code in the page. I think it's supposed to be without. I noticed that the <Apps:fillin> and < /Apps:fillin> are still showing up in the source - shouldn't they have disappeared? Maybe something needs to be done to my sandbox to make that work? I committed the page I'm working on: http://sassy.soma.redhat.com:8500/apps/response/enroll_channel.html I tihnk /apps/global.asa and /home/httpd/lib/HTML/FillInForm ( plus HTML::Parser ) need to be updated on that machine. Paul?? No, those files are already updated. Are there any others I may be missing? |