Jump to content

SELECT box not showing inside form, outside table


bulrush

Recommended Posts

I want to show several buttons, then a SELECT box, at the top of my form (just inside the form) but before my table starts. Is this legal? Because the select box is not showing up, only the command buttons are.

 

Here is my form source:

<form action="/toolbox/training/masttest/editbullets.php?&partid=24022&brandid=22554&model=V1235FHL&prodcat=Vanity Cabinets&brand=Thomasville Nouveau" method="post">
<hr/>Commands: 
<input type="submit" name="cmdSave" value="Save" title="Save all changes on this screen" /> 
<input type="submit" name="cmdDelete" value="Delete" title="Delete checked bullets" /> 
<button type='submit' name='cmdCopybullet' value='1' disabled="disabled" >Copy</button>
<hr/>
<table>
...

 

The SELECT box should appear right before the <button> that says "Copy".

 

Here is my code:

    $buttons='<hr/>Commands: <input type="submit" name="cmdSave" value="Save" '.
        'title="Save all changes on this screen" /> ';
    $buttons.='<input type="submit" name="cmdDelete" value="Delete" '.
        'title="Delete checked bullets" /> ';
    //Copy bullets to another brand combo box.
    //Now show only brands that are not this brand.
    //Only show combo box if brand is checked.
    $query2="SELECT partid,bullettext FROM bullets ".
    	"WHERE (partid=".$partid.") ".
    	"AND (brandid='".$brandid."') ".
    	";";
    //crDebug($query2); //DEBUG
    $numbull=crqryCount($query2,false); //Number of bullets.
    $bullets.=' From ';
$query2 = "SELECT brd ".
    "FROM zzbr ".
    "WHERE (br <> '".$brand."') ".
"AND (ng>0) ".
    "ORDER BY brand ".
    ";";
    $t=crCreateSelectStr($query2,'cbxCopyto','brand');
    crDebug($t); //DEBUG. Display variable to screen.
    $bullets.="$t\n";
    $buttons.="\n<button type='submit' name='cmdCopybullet' value='1' ";
    if ($numbull>0)
       	{
       	$buttons.='disabled="disabled" ';
       	}
    $buttons.='>Copy</button>'."\n";
    //echo "$s\n";
    //crDebug($query2); //DEBUG
    $buttons.='<hr/>'."\n";

echo 'Please note:'."\n";
    echo '<ul>'."\n";
    echo '<li><b>Text fields</b>: '.NOTALLOWED.'</li>'."\n";
    echo '<li>Edits and deletions must be separate steps.</li>'."\n";
    echo '<li>Last period deleted from each bullet. Other trailing punctuation not deleted.</li>'."\n";
    echo '</ul>'."\n";

$act=$_SERVER['PHP_SELF'].'?'.SID.'&partid='.$partid.
     '&brandid='.$brandid.
     '&model='.$model.'&prodcat='.$prodcat.
     '&brand='.$brand;
    echo '<form action="'.$act.'" method="post">'."\n";
    echo $buttons;

//Select parts based on $partid. Then fill in text boxes.
echo '<table>'."\n";

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.