CMSms 1.5.1 / Form Builder module - NOT XHTML valid !

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
pamelina
Forum Members
Forum Members
Posts: 69
Joined: Mon Nov 05, 2007 4:05 pm

CMSms 1.5.1 / Form Builder module - NOT XHTML valid !

Post by pamelina »

Hi there !

I use FormBuilder 0.5.5 module with CMSms 1.5.1 ...
However it fails to XHTML validate the website when there is contact form installed ...

{cms_module module='FormBuilder' form='contact_me'}


Here is what I get ...

#  Error  Line 220, Column 130: duplicate specification of attribute "id".

…m" type="submit" class="fbsubmit" id="fbsubmit3"  />



You have specified an attribute more than once. Example: Using the "height" attribute twice on the same "img" tag.
# Error Line 220, Column > 80: XML Parsing Error: Attribute id redefined.

…5fbrp_submit" id="m5fbrp_submit" value="Submit Form" type="submit" class="fbs…


When CMSms 1.4.1 is used everithing works just fine ....

Regards
Last edited by pamelina on Wed Dec 17, 2008 6:49 pm, edited 1 time in total.
carasmo
Power Poster
Power Poster
Posts: 506
Joined: Thu Feb 08, 2007 6:11 pm

Re: CMSms 1.5.1 / Form Builder module - NOT XHTML valid !

Post by carasmo »

go to modules/formbuilder/classes

get the Form.class.php

make a copy for safety


go to lines

749 -751

Code: Select all

	   $mod->smarty->assign('submit',$jsStr . $mod->CreateInputSubmit($id, 'fbrp_submit',
				$this->GetAttr('submit_button_text'),
				'class="fbsubmit" id="fbsubmit'.$this->Id.'"'.$jsTrigger.' '.$js));
change to:

Code: Select all

	   $mod->smarty->assign('submit',$jsStr . $mod->CreateInputSubmit($id, 'fbrp_submit',
				$this->GetAttr('submit_button_text'),
				'class="fbsubmit"'));

The other submit in the first part removes the text from the button in the rendered xhtml, that is why I removed the second one. However, the second one uses the javascript function, if you use javascript with the form it won't work and another solution will need to be used.

BTW use phpCaptcha, the other errors 66 or so with validating the xhtml
Last edited by carasmo on Wed Dec 17, 2008 10:08 pm, edited 1 time in total.
carasmo
Power Poster
Power Poster
Posts: 506
Joined: Thu Feb 08, 2007 6:11 pm

Re: CMSms 1.5.1 / Form Builder module - NOT XHTML valid !

Post by carasmo »

Oh yeah, I don't have time now, but compare the Form.class.php with the 1.41 version and see what happened, perhaps a quick fix to make it work with Javascript too.
Post Reply

Return to “Layout and Design (CSS & HTML)”