Skip form_name="this_form” parameter? Not validating in strict mode
Posted: 05 May 2008 08:10 AM   [ Ignore ]
Newbie
Avatar
Rank
Total Posts:  3
Joined  2007-03-13

Since attribute “name” in forms does not validate in XHTML strict mode, is it possible to skip/avoid it?

Even if it’s not set as a parameter form_name="this_form" it still adds the attribute to the form generated by {exp:user:forgot}.

Thanks In advance

 Signature 

http://www.elementalmedia.info

Profile
 
 
Posted: 06 May 2008 06:22 AM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  2320
Joined  2006-10-18

Elemental,

Open up mod.user.php… on line 5670, you’ll find this:

$this->data['name'] = ( $TMPL->fetch_param('form_name') ) ? $TMPL->fetch_param('form_name'): 'forgot_password_form';

Change to this:

if ( $TMPL->fetch_param('form_name') !== FALSE AND  $TMPL->fetch_param('form_name') != '' )
  
{
  $this
->data['name'] =  $TMPL->fetch_param('form_name');
  
}

It will now no longer have a default value, but will still work if you specify the form_name parameter smile

 Signature 
Profile
 
 
Posted: 06 May 2008 12:36 PM   [ Ignore ]   [ # 2 ]
Newbie
Avatar
Rank
Total Posts:  3
Joined  2007-03-13

Great, Thank you.

Tested, it works just as advertised smile Maybe this should be a standard feature.

Thanks again,
Stan

 Signature 

http://www.elementalmedia.info

Profile
 
 
Posted: 06 May 2008 02:46 PM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  2320
Joined  2006-10-18

That’s the plan my friend smile

Thanks for the catch wink

 Signature 
Profile
 
 
Posted: 04 June 2008 03:29 AM   [ Ignore ]   [ # 4 ]
Newbie
Rank
Total Posts:  2
Joined  2007-07-24

UPDATE: Nevermind - it was a different element causing my validation errors.

Pardon my apparent blindness but where is this mod.user.php located? I found mod.freeform.php but couldn’t find the snippet in question. Thanks.

Profile
 
 
Posted: 04 June 2008 07:00 AM   [ Ignore ]   [ # 5 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  2320
Joined  2006-10-18

markterpstra,

It would be located in:

/path/to/ee/system/modules/user/

smile

 Signature 
Profile