[pmwiki-users] zapdata questions

The Editor editor at fast.st
Sat Dec 2 18:19:31 CST 2006


On 12/2/06, dso <dso at moosoft.com> wrote:
> I am having trouble getting a zapdata form to work.  First is with the
> conditional.  The page just shows the conditional instead of evaluating
> it.

Looks like you are missing an ending : in the conditional.

> The second is even without the conditional the dbsearch recipe does
> not seem to get the data.

It could have to do with the order of markup processing.  Do you know
where on the markup table dbsearch is done?  It will need to be done
after page variables are processed. Kan you see {$key} and {$type}
elsewhere on the page (as in after the search for input box?

> Also, how can set one of the radio buttons to
> be selected by default? Thanks for any help!

Not easily.  PmWiki doesn't have any way to do it, without using
conditionals... If value = whatever, set as checked or not checked.

> (:messages:)
> (:zapdata:)
> (:zapform:)
>
> (:if !equal {$type} '')
> (:dbsearch key={$key} type={$type}:)
> (:ifend:)
>
> Search for: (:input text key {$key}:){$key}\\
> Partial: (:input radio type {$type} value="partial":)
> Exact:  (:input radio type {$type} value="exact":)\\

There may be another problem here.  Normally the fourth parameter is
value.  These lines should be rewritten to:

Partial: (:input radio type "partial":)
Exact:  (:input radio type "exact":)\\

> (:input submit value="Search":)
> (:zapend:)

Cheers,
Caveman




More information about the pmwiki-users mailing list