Results 1 to 2 of 2

Thread: Styling Member Registration form problem

  1. #1
    New user
    Join Date
    11-27-09.
    Location
    NW, UK
    Posts
    10

    Default Styling Member Registration form problem

    Hello, I am confused by the (unless I'm an idiot) differences in the way the tableless modes in member registration module and the form tpls are set up. I'm using 2.7~ for my examples, but I have checked 2.8 and it seems to be the same.

    To style a tableless custom form, its as simple as wrapping the outputs in divs in the same way it works with the table mode.

    Tableless mode:form_widget.tpl
    <div class="<?php echo $this->rowClass; ?>">
    <div class="col_0 col_first"><?php echo $this->generateLabel(); ?> </div>
    <div class="col_1 col_last"><?php echo $this->generateWithError(); ?></div>
    </div>
    This does not seem to be possible with member_default.tpl
    <form action="<?php echo $this->action; ?>" method="post" enctype="<?php echo $this->enctype; ?>">
    <div class="formbody">
    <input type="hidden" name="FORM_SUBMIT" value="<?php echo $this->formId; ?>" />
    <table cellspacing="0" cellpadding="0" summary="">
    <?php echo $this->fields; ?>
    <tr class="<?php echo $this->rowLast; ?> row_last">
    <td class="col_0 col_first"> </td>
    <td class="col_1 col_last"><div class="submit_container"><input type="submit" class="submit" value="<?php echo $this->slabel; ?>" /></div></td>
    </tr>
    </table>
    </div>
    </form>
    Where are these fields taken from and less importantly, how come submit_container is visible to style but not the others?

    The form is obviously styled normally in table mode, but I have been unable to do anything more than wrap that member_default <?php echo $this->fields; ?> output in a single div.

    Could someone please show me how to individually wrap the label and the form field please, as it is with form_widget.tpl

    - - -
    In case you're wondering why I didnt use a custom form, or why I don't just use the tables, I had done so and it was styled exactly as needed, but I ran into an issue with groupselection from xtmembers and labels respectively.

    That thread is here: viewtopic.php?f=25&t=878

  2. #2
    New user
    Join Date
    11-27-09.
    Location
    NW, UK
    Posts
    10

    Default Re: Styling Member Registration form problem

    I've realised that I can edit the way the member registration form in the way I want by editing tables mode in the form_*.tpl files in the same way I edited tableless mode for my custom forms. This seems to function differently to the way other forms do

    form_widget.tpl
    <?php if (!$this->tableless): ?>
    <div class="<?php echo $this->rowClass; ?>">
    <div class="col_0 col_first"><?php echo $this->generateLabel(); ?><?php if ($this->mandatory): ?><span class="mandatory">*</span><?php endif; ?></div>
    <div class="col_1 col_last"><?php echo $this->generateWithError(); ?></div>
    </div>
    <?php else: ?>
    <div class="<?php echo $this->rowClass; ?>">
    <div class="col_0 col_first"><?php echo $this->generateLabel(); ?> </div>
    <div class="col_1 col_last"><?php echo $this->generateWithError(); ?></div>
    </div>
    <?php endif; ?>

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
  •