[pmwiki-devel] PmForm - Need a little help

Steven Leite steven_leite at kitimat.net
Sun Mar 20 06:41:50 CDT 2011


Hello PmForm users.  Need a little help please!

I already have (:pmform:) working successfully. That's not the problem.  
Where I'm having difficulty is getting a custom function I wrote to work 
WITH pmform.

Basically I'm using Markup(); as a hook to call my own function 
ProductDisplay(); which returns some $html which includes form 
(:inputs:).  The problem is when the page is rendered, there are 2 
separate forms on the page instead of ONE form with all the fields merged.

PmForm is not seeing any of the form elements that I am trying to 
introduce.  It only sees what is defined in the Site.LocalTemplates.

For example when I view source of my page I see something like this:

<form>                   // PmForm
.. input fields          // based on template located at Site.LocalTemplates
</form>                  // end of PmForm

.. more input fields     // generated by my script

How can I get custom input fields injected in to PmForm?

----

I've looked a bit at PTV's, but I'm not sure if that's the correct 
path.  The problem is that whenthe user hits the "Submit" button, non 
all of the form fields are being sent to PmForm.

----

A simple solution?

I have a simple solution, but I'm not sure how to implement it.

Instead of storing the form template on Site.LocalTemplates, I wouldn't 
mind just hard-coding it in to my script.

Something like this:

$form_template = ' blah blah blah -- all the necessary information that 
is normally found on the Site.LocalTemplates page ';

then a call to PmForm

(:pmform source = $form_template:)

That way I could dynamically generate the $form_template every time, and 
then have pmform process things.

No idea if this is possible - would sure make it simpler if it was.

----


Thanks in advance,

S Leite



More information about the pmwiki-devel mailing list