1
phillipd
What does <{$searchform.javascript}> do?
  • 2005/3/18 19:39

  • phillipd

  • Quite a regular

  • Posts: 219

  • Since: 2004/4/20


I'm looking at some sample code in the xoops_members module and in one of the template files, xoopsmembers_searchform.html, there is the following code:

What exactly does the first line do? Please be very verbose.

<{$searchform.javascript}> <== This line, what does it do?
<{$searchform.title}>



>


<{foreach item=element from=$searchform.elements}>
<{if $element.hidden != true}>




<{else}>
<{$element.body}>
<{/if}>
<{/foreach}>

<{$element.caption}> "><{$element.body}>


2
fatman
Re: What does do?
  • 2005/3/18 20:46

  • fatman

  • Friend of XOOPS

  • Posts: 176

  • Since: 2003/12/13


<{$searchform.javascript}> is a Smarty tag.

Somewhere in the module PHP script which loads that form the developer is using the XoopsForm class to build all the form fields and form details. This XoopsForm was assigned to Smarty using the name 'searchform'.

All of the <{$searchform.something}> tags hold some sort of details about the form. <{$searchform.javascript}> will likely include any javascript the developer is using with thier form (most likely for validation).

If you look at the HTML source of the actual page when loaded in XOOPs you'll see that in place of <{$searchform.javascript}> there will probably be a chunk of javascript code.

Hope thats the answer you're looking for.

Login

Who's Online

268 user(s) are online (213 user(s) are browsing Support Forums)


Members: 0


Guests: 268


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits