0

Hi all, am trying to add an html form to a lightbox with no success.
Here is my code:

<a href="service_form.php" rel="lightbox">
<input name='input' type='' class='btn-primary' value='Add a Service Tag' rel='lightbox'>
</a>

Note: I have been able to add an image with the same code and it works fine,so the code is working fine.
Am just having troulble adding a from to the ligthbox popup.

4
Contributors
5
Replies
20
Views
4 Years
Discussion Span
Last Post by LastMitch
0

Note: I have been able to add an image with the same code and it works fine,so the code is working fine.

What issue you are having?

I think lightbox is a related to javascript not php.

You can take a look at here:

http://www.xul.fr/javascript/lightbox-form.html

For a general php form it looks like this:

<form action="service_form.php" method="post">
First Name: <input type="text" name="fname">
Last Name: <input type="text" name="lname">
Age: <input type="text" name="age">
<input type="submit">
</form>

Unless your <form> is connected to the database and you have the code and a query for that then it makes sense if you post here (PHP).

Edited by LastMitch: grammer

0

Here is my form

<form name="form1" method="post" action="">
<table class="table table-striped" width="300" border="0" cellspacing="2" cellpadding="2">
  <tr>
    <td width="142">&nbsp;</td>
    <td width="144">&nbsp;</td>
  </tr>
  <tr>
    <td>Service Tag Name</td>
    <td><label for="textfield"></label>
      <select name="select" multiple class="chzn-select span6" data-placeholder="Choose Services completed
/s...">
<?php

    $query = "SELECT * FROM cuz_ven order by uz_ze desc";
    $rs = mysql_query($query);                                                                                                  while($row = mysql_fetch_assoc($rs)) 
   {    
    { 
      $uz_ze = $row['uz_ze'];
   echo"<option value='$uz_ze'>$uz_ze</option>";}

        }?>
          </select>
           </td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td colspan="2">
    <input name="addTag" class='btn-primary pull-center' type="button" value="Add"></td>
  </tr>
</table>

</form>
0

Now I Get It, you want a light box ( a div ) that has the content of a form

I suggest that before your form tag. place a div tag

then use a jQuery. there are a lots lightbox in jQuery

0

Am just having troulble adding a from to the ligthbox popup.

I know you post the code but what are you trying to do?

What kind of input form you are talking about?

You only mention you need a form.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.