vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How to pull information out of a template form (https://vborg.vbsupport.ru/showthread.php?t=110242)

gopherhockey 03-13-2006 02:04 PM

How to pull information out of a template form
 
I have an old hack that stopped working with vb 3.5.

At one point we are asking the user to update the condition of a local mountain bike trail. The call is:

Code:

eval('print_output("' . fetch_template('edittrail') . '");');
The template is:

Code:

<html>
<head>
<title>$bbtitle - Update of trail $namit</title>
 
$headinclude

</head>
<body>
$header
<table cellpadding="2" cellspacing="0" border="0"  align="center">
<tr>
 <td width="100%">$navbar</td>
</tr>
</table>
<br>
<form $enctype name="vbform" action="trail.php" method="post" onSubmit="return validate(this)">
<input type="hidden" name="s" value="$session[sessionhash]">
<input type="hidden" name="action" value="updatetrail">
<input type="hidden" name="trailid" value="$trailid">

<table cellspacing="0" border="0" class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]"  width="{contenttablewidth}" align="center"><tr><td>
<table cellpadding="4" border="0" width="100%">
<tr>
 <td class="tcat" colspan="2"><normalfont class="tcat"><b>$namit $trailinfo[name]</b></normalfont></td>
</tr>
$logincode
<tr>
<td class="alt2" valign="top" nowrap><normalfont><b>$othercond</b></normalfont></td>
<td class="alt2" valign="top" nowrap>
          <select name="generalid">
            <option value="0">Condition?</option>
            <option value="1">$drop1</option>
            <option value="2">$drop2</option>
            <option value="3">$drop3</option>
            <option value="4">$drop4</option>
            <option value="5">$drop5</option>
          </select>
          &nbsp;&nbsp;&nbsp;&nbsp;<smallfont><b>(Last $othercond:  $lastcond[descript])</b></smallfont>
</td>
</tr>
<tr>
<td class="alt2" valign="top" nowrap><normalfont><b>Link</b></normalfont></td>
<td class="alt2" valign="top" nowrap>
<input type="hidden" name="link" value="$trailinfo[links]">

</td>
</tr>
<tr>
<td class="alt2" valign="top" nowrap><normalfont><b>Time & Date Ridden</d></normalfont></td>
<td  class="alt2" valign="top" nowrap>
<input type="text" name="date" value="$trailinfo[dateline]" size="10">

</td></tr>
<tr>
 <td class="alt1" valign="top" nowrap><normalfont><b>$conditionname to edit:</b><BR><BR>Limit 400 characters</normalfont>
 </td>
 <td class="alt1">
 <table cellpadding="0" cellspacing="0" border="0">
 <tr valign="top">
  <td>
<textarea name="message" rows="6" cols="40" wrap="virtual" tabindex="2"> </textarea>
<br>
  </td>
 </tr>
 </table>
 </td>
</tr>
</table>
</td></tr></table>
<br>
<table cellpadding="2" cellspacing="0" border="0" width="{contenttablewidth}" {tableinvisibleextra} align="center">
<tr>
 <td align="center"><normalfont>
 <input type="submit" class="bginput" name="submit" accesskey="s" value="Save Changes" tabindex="3">
        <input type="reset" class="bginput" value="Reset Message" tabindex="4">
 </normalfont></td>
</tr>
</table>
</form>
$footer
</body>
</html>

Immediate after the template there is code that says:

Code:

if ($message=="") {
with an error that says please go back and enter a description of the trail conditions.

It used to work just fine. Now even with text entered in the message field I get the message to go back and enter information in the description.

It appears that I am not getting the form information that is passed back from the template.

Am I missing something?


All times are GMT. The time now is 08:33 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01012 seconds
  • Memory Usage 1,719KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete