Hello all,
I am trying out ChronoForms for a new website for a gaming clan. We have certain users that manage clan membership and I want them to have a form on the frontend where they can change a registered user's group and name.
I have the form created, it is populated with the registered user's username, name, and current group (in a dropdown). When I change the name and group and hit submit, my changes are not written to the database.
I have enabled Data Storage, picked jos_users and Saving Data is set to "After Email" even though I am not doing anything with email. Debug on shows me no errors. I assumed the names of the form text fields and pulldown needed to match the field names in jos_users.
What else do I need to do? I've looked through the tutorials and the forums and can't find anything about getting data from a form into a joomla core table. If something is already written up, please point me to it.
Here is my Form HTML:
<? $user = &JFactory::getUser(JRequest::getVar('uid')); ?>
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 150px;">UserName</label>
<input class="cf_inputbox" maxlength="150" size="30" title="" id="text_0" name="username" type="text" value="<?= $user->username; ?>" />
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 150px;">Name</label>
<input class="cf_inputbox" maxlength="150" size="30" title="" id="text_1" name="name" type="text" value="<?= $user->name; ?>" />
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_dropdown">
<label class="cf_label" style="width: 150px;">Group</label>
<select class="cf_inputbox" id="select_2" size="1" title="" name="gid">
<option value="18" <?= $user->gid == "18" ? 'selected' : '' ?> >Registered</option>
<option value="37" <?= $user->gid == "37" ? 'selected' : '' ?> >TrialMember</option>
<option value="36" <?= $user->gid == "36" ? 'selected' : '' ?> >ClanMember</option>
<option value="46" <?= $user->gid == "46" ? 'selected' : '' ?> >Retired</option>
</select>
<? //echo var_dump($user); ?>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_button">
<input value="Submit" name="button_3" type="submit" />
</div>
<div class="cfclear"> </div>
</div>
THANKS!
I am trying out ChronoForms for a new website for a gaming clan. We have certain users that manage clan membership and I want them to have a form on the frontend where they can change a registered user's group and name.
I have the form created, it is populated with the registered user's username, name, and current group (in a dropdown). When I change the name and group and hit submit, my changes are not written to the database.
I have enabled Data Storage, picked jos_users and Saving Data is set to "After Email" even though I am not doing anything with email. Debug on shows me no errors. I assumed the names of the form text fields and pulldown needed to match the field names in jos_users.
What else do I need to do? I've looked through the tutorials and the forums and can't find anything about getting data from a form into a joomla core table. If something is already written up, please point me to it.
Here is my Form HTML:
<? $user = &JFactory::getUser(JRequest::getVar('uid')); ?>
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 150px;">UserName</label>
<input class="cf_inputbox" maxlength="150" size="30" title="" id="text_0" name="username" type="text" value="<?= $user->username; ?>" />
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 150px;">Name</label>
<input class="cf_inputbox" maxlength="150" size="30" title="" id="text_1" name="name" type="text" value="<?= $user->name; ?>" />
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_dropdown">
<label class="cf_label" style="width: 150px;">Group</label>
<select class="cf_inputbox" id="select_2" size="1" title="" name="gid">
<option value="18" <?= $user->gid == "18" ? 'selected' : '' ?> >Registered</option>
<option value="37" <?= $user->gid == "37" ? 'selected' : '' ?> >TrialMember</option>
<option value="36" <?= $user->gid == "36" ? 'selected' : '' ?> >ClanMember</option>
<option value="46" <?= $user->gid == "46" ? 'selected' : '' ?> >Retired</option>
</select>
<? //echo var_dump($user); ?>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_button">
<input value="Submit" name="button_3" type="submit" />
</div>
<div class="cfclear"> </div>
</div>
THANKS!