SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    Simulation Cricketer
    Join Date
    Sep 2004
    Location
    australia
    Posts
    470
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Strange layout, please help

    Firstly, here is a screenshot of my problem:



    And my code:

    PHP Code:
        $fa1 =    "<input type=\"radio\" name=\"$inp\" value='$f1' />&nbsp;
                     <span class='gen'>
    $f1</span><br>";
                     
        
    $fa2 "<input type=\"radio\" name=\"$inp\" value=\"$f2\" />&nbsp;
                     <span class=\"gen\">
    $f2</span><br>";
                     
        
    $fa3 "<input type=\"radio\" name=\"$inp\" value=\"$f3\" />&nbsp;
                     <span class=\"gen\">
    $f3</span><br>";
                     
        
    $ano "<input type=\"radio\" name=\"$inp\" value=\"$f1\" />&nbsp;
                     <span class=\"gen\">
    $a</span><br>";


                      
    $tbs = array($fa1$fa2$fa3$ano);
                      
    shuffle($tbs);
                      
                                      
                                     
        foreach (
    $tbs as $bla)
        {
    $template->assign_block_vars("quizrow", array(
    "RADICAL" => $bla)
    );
        } 
    And my template file:

    Code:
    <!-- BEGIN quizrow -->
      <tr>
       <td class="row1" align="center" valign="middle" height="50"><span class="forumlink">{quizrow.ACTQ}</span></td>
       <td class="row2" align="left" valign="left" height="50"><span class="gensmall">
                                {quizrow.RADICAL}
    							<input type="hidden" name="Hidden" value="{HIDDEN_FIELD}">
    
    	</span></td>
    
      </tr>
    <!-- END quizrow -->
    What I want is for the choices for each question to actually be in the same row as the question, so looking something like:



    Sorry for asking yet another question

  2. #2
    Simulation Cricketer
    Join Date
    Sep 2004
    Location
    australia
    Posts
    470
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anyone?

  3. #3
    SitePoint Zealot devscripts's Avatar
    Join Date
    Sep 2004
    Location
    ur monitor
    Posts
    175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <table>
    <tr>
    <td> my question here</td>
    <td> my form with radios here</td>
    </tr>
    <tr>
    <td> my next question here</td>
    <td> my form with radios here</td>
    </tr>
    </table>
    "None of you [truly] believes until he wishes for his brother what he wishes for himself." By The one and Only Prophet Mohammed (Peace and blessings be upon him)

  4. #4
    Simulation Cricketer
    Join Date
    Sep 2004
    Location
    australia
    Posts
    470
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's how I already have it:

    <td class="row1" align="center" valign="middle" height="50"><span class="forumlink">{quizrow.ACTQ}</span></td>
    <td class="row2" align="left" valign="left" height="50"><span class="gensmall">
    {quizrow.RADICAL} // <<< That is $tbs from the other page
    <input type="hidden" name="Hidden" value="{HIDDEN_FIELD}">
    </span></td>

  5. #5
    Are You There? KDesigns's Avatar
    Join Date
    Oct 2003
    Location
    Your Monitor
    Posts
    1,146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You need to set the valign on your first <td> to 'top'. RIght now it is at middle and will always appear in the middle of the cell.

    Secondly you have the valign on your second <td> set to 'left. The valign can only be set to: baseline, bottom, middle, or top.
    ChooseDaily.com - Follow on Twitter
    Top Resources for Web Designers and Developers Every Day!

  6. #6
    Simulation Cricketer
    Join Date
    Sep 2004
    Location
    australia
    Posts
    470
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    im happy with the placement within the cell, i just want all the radio options for the different questions in a cell unique to the question. I hope that makes sense

  7. #7
    Are You There? KDesigns's Avatar
    Join Date
    Oct 2003
    Location
    Your Monitor
    Posts
    1,146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What is... 'assign_block_vars()' ??

    Is there any layout data included in that call? That could be what is causing your probelms.
    ChooseDaily.com - Follow on Twitter
    Top Resources for Web Designers and Developers Every Day!

  8. #8
    Simulation Cricketer
    Join Date
    Sep 2004
    Location
    australia
    Posts
    470
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's add-on to phpBB I'm making, assign_block_vars is a templating routine.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •