[User] exp:user:edit showform option?
Posted: 03 April 2008 01:00 AM   [ Ignore ]
Member
Avatar
RankRankRank
Total Posts:  86
Joined  2008-02-26

Is it possible to request an option on exp:user:edit to turn off form rendering?

I have created an embed that is called like this:

{exp:user:edit}
<p><span class="title">First name *:</span> <span class="value"><input name="first_name" value="{first_name}" /></span></p>
<
p><span class="title">Last name *:</span> <input name="last_name" value="{last_name}" /></span></p>
etc..etc..etc
{embed
="members/member-categories" group="2"}
{embed
="members/member-categories" type="multi" group="4"}
{exp
:user:edit}

And the code in that embed looks like this:

{exp:user:edit}
{categories group_id
="{embed:group}"}
  {category_group_header}
   
<p><span class="title">{category_group_name}:</span>
   
{if embed:type=="multi"}
 
<select name="category[]" multiple="multiple" size="4">
   
{if:else}
 
<select name="category[]">
   
{/if}
  {
/category_group_header}
  {category_selected}selected
="selected"{/category_selected}
  {category_body}
<option value="{category_id}" {selected}>{category_name}</option>{/category_body}
  {category_group_footer}
   
</select></p>
  
{/category_group_footer}
{
/categories}
{
/exp:user:edit}

The extra form tags rendered inside my embeds cause the form not to work, so if I could turn them off it would rock. I could then enhance my ‘type’ parameter to render as checkboxes etc.

 Signature 

Andy Harris | Pepper Digital | Malvern, UK

Profile
 
 
Posted: 03 April 2008 05:28 AM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  693
Joined  2004-03-30

Andy,

I’ll talk this through with PieMan, but what we most likely want to do is change the behavior in exp:user:stats so that you can embed that function and tell it to show all the categories with the user’s specific categories selected. This would solve your problem and enhance functionality for others. It’s not something we can add immediately though. We need to knock out a couple of other tasks.

mk

 Signature 

Mitchell Kimbrough

Profile
 
 
Posted: 03 April 2008 06:49 AM   [ Ignore ]   [ # 2 ]
Member
Avatar
RankRankRank
Total Posts:  86
Joined  2008-02-26

Fair enough, thanks and I look forward to it.

Out of interest, and I know it’s a vague question without knowing me from Adam, but how difficult do you think it would be for me to add this functionality to my user module - simply because I really could do with it being ready ASAP, and it’d be a good stop-gap until the ‘official’ one is done.

 Signature 

Andy Harris | Pepper Digital | Malvern, UK

Profile
 
 
Posted: 03 April 2008 12:01 PM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  693
Joined  2004-03-30

The category recurrence functionality in User is some of the best and most difficult code I’ve ever written. I would caution you strongly. If you do figure it out before I can make the change, I’ll hire you as a Solspace software developer. smile

mk

 Signature 

Mitchell Kimbrough

Profile
 
 
Posted: 03 April 2008 12:11 PM   [ Ignore ]   [ # 4 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  2691
Joined  2006-10-18
Mitchell Kimbrough - 03 April 2008 12:01 PM

The category recurrence functionality in User is some of the best and most difficult code I’ve ever written. I would caution you strongly. If you do figure it out before I can make the change, I’ll hire you as a Solspace software developer. smile

mk

That’s a very bold statement Mitchell… haha LOL

 Signature 
Profile
 
 
Posted: 04 April 2008 12:53 AM   [ Ignore ]   [ # 5 ]
Member
Avatar
RankRankRank
Total Posts:  86
Joined  2008-02-26

I was thinking more of duplicating whatever code was already there for exp:user:edit and then calling it via something like exp:user:edit2. The new version being the same, except for lack of form tags....sound tricky still? If so I’ll just wait!  LOL

 Signature 

Andy Harris | Pepper Digital | Malvern, UK

Profile
 
 
Posted: 04 April 2008 06:13 AM   [ Ignore ]   [ # 6 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  693
Joined  2004-03-30

That could work temporarily. sure. Good one

 Signature 

Mitchell Kimbrough

Profile
 
 
Posted: 07 April 2008 01:16 AM   [ Ignore ]   [ # 7 ]
Member
Avatar
RankRankRank
Total Posts:  86
Joined  2008-02-26

Well I gave this a try, but couldn’t get it to work so I gave up as I have to work on other things - bang goes that developer position smile

 Signature 

Andy Harris | Pepper Digital | Malvern, UK

Profile
 
 
Posted: 07 April 2008 05:14 PM   [ Ignore ]   [ # 8 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  693
Joined  2004-03-30

Sorry to hear it Andy. We’ll get you sorted shortly, hopefully.

mk

 Signature 

Mitchell Kimbrough

Profile