Being relatively new to Modx I probably haven't read the fine print somewhere, so perhaps someone can shed some light on this.
In battling with the Login package I have found that when I paste code into a Resource and save it, Modx alters that code, at least in the instance below:
Using login.UpdateProfile as indicated in rtfm I paste the following code into a resource (editor toggled off).
<p>[[!UpdateProfile? ]]</p>
<div class="update-profile">
<div class="updprof-error">[[+error.message]]</div>
<div style="color: #66cc00;">[[+login.update_success:if=`[[+login.update_success]]`:is=`1`:then=`[[%login.profile_updated? &namespace=`login` &topic=`updateprofile`]]`]]
<form class="form" action="[[~[[*id]]]]" method="post"><input type="hidden" name="nospam:blank" value="" /></div>
<p> </p>
<label for="fullname">[[!%login.fullname? &namespace=`login` &topic=`updateprofile`]] <span class="error">[[+error.fullname]]</span> </label> <input id="fullname" type="text" name="fullname" value="[[+fullname]]" />
<p> </p>
<label for="email">[[!%login.email]] <span class="error">[[+error.email]]</span> </label> <input id="email" type="text" name="email:required:email" value="[[+email]]" />
<p> </p>
<label for="phone">[[!%login.phone]] <span class="error">[[+error.phone]]</span> </label> <input id="phone" type="text" name="phone" value="[[+phone]]" />
<p> </p>
<label for="mobilephone">[[!%login.mobilephone]] <span class="error">[[+error.mobilephone]]</span> </label> <input id="mobilephone" type="text" name="mobilephone" value="[[+mobilephone]]" />
<p> </p>
<label for="address">[[!%login.address]] <span class="error">[[+error.address]]</span> </label> <input id="address" type="text" name="address" value="[[+address]]" />
<p> </p>
<label for="city">[[!%login.city]] <span class="error">[[+error.city]]</span> </label> <input id="city" type="text" name="city" value="[[+city]]" />
<p> </p>
<label for="state">[[!%login.state]] <span class="error">[[+error.state]]</span> </label> <input id="state" type="text" name="state" value="[[+state]]" />
<p> </p>
<label for="zip">[[!%login.zip]] <span class="error">[[+error.zip]]</span> </label> <input id="zip" type="text" name="zip" value="[[+zip]]" />
<p> </p>
<br class="clear" />
<div class="form-buttons"><input type="submit" name="login-updprof-btn" value="[[!%login.update_profile]]" /></div></form>
</div>
Note the position of the closing </form> at the end of line 24.
The following code is what is produced AFTER the resource has been saved and the Manager page refreshed. Note that the </form> statement has been moved from the last line up to close the <form> near the beginning of the code at Line 5 and that it no longer exists at the end:
<p>[[!UpdateProfile? ]]</p>
<div class="update-profile">
<div class="updprof-error">[[+error.message]]</div>
<div style="color: #66cc00;">[[+login.update_success:if=`[[+login.update_success]]`:is=`1`:then=`[[%login.profile_updated? &namespace=`login` &topic=`updateprofile`]]`]]
<form class="form" action="[[~[[*id]]]]" method="post"><input type="hidden" name="nospam:blank" value="" /></form></div>
<p> </p>
<label for="fullname">[[!%login.fullname? &namespace=`login` &topic=`updateprofile`]] <span class="error">[[+error.fullname]]</span> </label> <input id="fullname" type="text" name="fullname" value="[[+fullname]]" />
<p> </p>
<label for="email">[[!%login.email]] <span class="error">[[+error.email]]</span> </label> <input id="email" type="text" name="email:required:email" value="[[+email]]" />
<p> </p>
<label for="phone">[[!%login.phone]] <span class="error">[[+error.phone]]</span> </label> <input id="phone" type="text" name="phone" value="[[+phone]]" />
<p> </p>
<label for="mobilephone">[[!%login.mobilephone]] <span class="error">[[+error.mobilephone]]</span> </label> <input id="mobilephone" type="text" name="mobilephone" value="[[+mobilephone]]" />
<p> </p>
<label for="address">[[!%login.address]] <span class="error">[[+error.address]]</span> </label> <input id="address" type="text" name="address" value="[[+address]]" />
<p> </p>
<label for="city">[[!%login.city]] <span class="error">[[+error.city]]</span> </label> <input id="city" type="text" name="city" value="[[+city]]" />
<p> </p>
<label for="state">[[!%login.state]] <span class="error">[[+error.state]]</span> </label> <input id="state" type="text" name="state" value="[[+state]]" />
<p> </p>
<label for="zip">[[!%login.zip]] <span class="error">[[+error.zip]]</span> </label> <input id="zip" type="text" name="zip" value="[[+zip]]" />
<p> </p>
<br class="clear" />
<div class="form-buttons"><input type="submit" name="login-updprof-btn" value="[[!%login.update_profile]]" /></div>
</div>
As, like most, I use a testing server and then transfer to my production server, I initially copied the code for this page to my production server and couldn't fathom why it wouldn't work. The altered code will not work if copied directly. The ORIGINAL code must be inserted - Modx then changes it to the new format.
[ed. note: bobd72 last edited this post 14 years, 4 months ago.]