This is a page that allow user to do register:
<?php echo form_open('user/valid_register_page', 'autocomplete="off"');?>
<?php $this->table->set_template(array('table_open'=>'<table class="table_form_register">'));
$this->table->add_row(form_label($label_email.
form_label(form_error('email'),'',array('class' => 'error_label')),
'label_email',
array('class' => 'form_label')),
array('class' => 'align_right_td',
'data' => form_input('email',
set_value('email'),
'class = "align_right_input require"')));
$this->table->add_row(form_label($label_invitation_key.
form_label(form_error('invitation_key'),'',array('class' => 'error_label')),
'label_invitation_key',
array('class' => 'form_label')),
array('class' => 'align_right_td',
'data' => form_password('invitation_key',
set_value('invitation_key'),
'class = "align_right_input require"')));
$this->table->add_row('',array('class' => 'button_td',
'data' => form_submit('register', $button_register, 'class = "form_td_button"')));
echo $this->table->generate();
?>
<?php echo form_close();?>
This code only have 2 label and 2 fields: one is email, another is the invitation keys. This is the code that render for generation the form, table, and the button with these 2 label and fields. But as you can see, it is very messy, if I need to maintain, it will become a headache. Any suggestions on how to make it simpler?