<field key="supplier" dbtype="int" precision="1" phptype="integer" null="true"/> <field key="supplieragent" dbtype="int" precision="1" phptype="integer" null="true"/>
<index alias="userdata_id" name="userdata_id" primary="false" unique="true" type="BTREE">
<div class="x-form-item x-tab-item">
<label class="x-form-item-label" style="width:auto; font-weight:bold; float:none; font-size:12px">Supplier</label>
<div class="x-form-item x-tab-item">
<input type="checkbox" name="supplier" value="[[+supplier]]" class="x-form-text x-form-field"
onClick="Ext.getCmp('modx-panel-user').markDirty();"/>
</div>
</div>
<div class="x-form-item x-tab-item">
<label class="x-form-item-label" style="width:auto; font-weight:bold; float:none; font-size:12px">Supplier Agent</label>
<div class="x-form-item x-tab-item">
<input type="checkbox" name="supplieragent" value="[[+supplieragent]]" class="x-form-text x-form-field"
onClick="Ext.getCmp('modx-panel-user').markDirty();"/>
</div>
</div><p>[[!Register? &submitVar=`registerbtn` &activationResourceId=`16` &activationEmailTpl=`tblRegistrationEmail` &activationEmailSubject=`Thanks for Registering!` &usergroups=`suppliers` &validate=`nospam:blank, username:required:minLength=^6^, password:required:minLength=^6^, password_confirm:password_confirm=^password^, fullname:required, email:required:email,company:required:minLength=^3^` &placeholderPrefix=`reg.` ]]</p> <div class="register"> <div class="registerMessage">[[!+reg.error.message]]</div> <form class="form" action="[[~[[*id]]]]" method="post"> <input type="hidden" name="nospam" value="[[!+reg.nospam]]" /> <label for="username">[[%register.username? &namespace=`login` &topic=`register`]]<span class="error">[[!+reg.error.username]]</span></label> <input id="username" type="text" name="username" value="[[!+reg.username]]" /><br> <label for="password">[[%register.password]]<span class="error">[[!+reg.error.password]]</span></label> <input id="password" type="password" name="password" value="[[!+reg.password]]" /> <br> <label for="password_confirm">[[%register.password_confirm]]<span class="error">[[!+reg.error.password_confirm]]</span></label> <input id="password_confirm" type="password" name="password_confirm" value="[[!+reg.password_confirm]]" /><br> <label for="fullname">[[%register.fullname]]<span class="error">[[!+reg.error.fullname]]</span></label> <input id="fullname" type="text" name="fullname" value="[[!+reg.fullname]]" /><br> <label for="email">[[%register.email]] <span class="error">[[!+reg.error.email]]</span></label> <input id="email" type="text" name="email" value="[[!+reg.email]]" /> <br class="clear" /><br> <label for="company">[[%register.company]] <span class="error">[[!+reg.error.company]]</span></label> <input id="company" type="text" name="company" value="[[!+reg.company]]" /> <br> <div class="form-buttons"><input type="submit" name="registerbtn" value="Register" /></div> </form> </div>
Also what is the best way to add data to the ext_user_data table from the front end. I tried add data to it through the register using the following code and the company name was not send to the table when entered on the form.
&postHooks=`ExtUserRegisterPosthook
[[!Register? &submitVar=`registerbtn` &activationResourceId=`16` &activationEmailTpl=`tblRegistrationEmail` &activationEmailSubject=`Thanks for Registering!` &usergroups=`suppliers` &validate=`nospam:blank, username:required:minLength=^6^, password:required:minLength=^6^, password_confirm:password_confirm=^password^, fullname:required, email:required:email,company:required:minLength=^3^` &placeholderPrefix=`reg.` &postHooks=`ExtUserRegisterPosthook`]]
I am creating a website that will act as a database to store information submitted by registered users. I have create custom tables to store the submitting data. Is there a way to link the modx "user table" so that I can record how is entering the data in the custom tables.
<?php
/**
* Functions as a hook for the Login package which we can use to call Insight.
*/
$insight = $modx->Insight;
if (is_object($insight) && $insight instanceof Insight) {
$userMail = $hook->getValue('register.email');
}
/* True must always be returned or account creation via Login will fail */
return true;