User Tools

Site Tools


howto:add-registration-logic-portal

Add registration logic to a portal

<form method="post">
   <input type="hidden" name="register"/>
   <input type="hidden" name="id" value="1"/>
   <?php
      foreach($register_forms[1]->fields as $field=>$config)
      {
         if($config->show==1) {     
   ?>
   <p>
      <label for="<?=$field?>" > <?=$arr_portal_lang[strtolower($field)]?> </label>
      <input id="<?=$field?>" name="<?=$field?>" <?=$config->html5==1 && $config->validate==2?"pattern='".$config->regex."'":""?> <?=$config->html5==1 && $config->validate>0?"required":""?> type="<?=$config->input_type?>" value="<?=$_POST[$field]?>" placeholder="<?=$config->placeholder?>"/>
   </p>
   <?php
      }
   } 
   ?>
   <p>
      <input class="login" type="submit" value="Register" name="register"/>
   </p>
</form>

Notice that the value for the hidden field “id” equals to the registration form that's needed. <input type=“hidden” name=“id” value=“1”/>

howto/add-registration-logic-portal.txt · Last modified: 2021/06/03 14:40 (external edit)