pimpMyJoomla Board
Welcome, Guest
Please Login or Register.
Lost Password?
Re:W3C compliance (1 viewing)
_GEN_GOTOBOTTOM Post Reply

TOPIC: Re:W3C compliance

#500
globule (User)
Senior Boarder
Posts: 10
graphgraph
W3C compliance 2007/05/17 14:01 Karma: 0  
As Forme is a new component, why you didn't choose to generate XHTML strict forms?
If you want, I have some code suggestions to go this way.
  The topic has been locked.
#501
alex (Admin)
Admin
Posts: 301
graph
Re:W3C compliance 2007/05/17 14:05 Karma: 8  
Hi,

let me know what your suggestions are.
  The topic has been locked.
#505
globule (User)
Senior Boarder
Posts: 10
graphgraph
Re:W3C compliance 2007/05/17 14:16 Karma: 0  
Here what I did right now.
Form style:
Code:

 <div align="left" style="width:100%" class="componentheading">{formtitle}</div> <div style="text-align:left; margin: 0 auto;"> <form name="{formname}" id="{formname}" method="post" action="{action}" {enctypeonsubmit="return ValidateForm(fields);"> <legend>Please fill this form</legend>     <fieldset>     {formfields}     </fieldset> </form> </div>


Field style:
Code:

     <div class="{fieldtype}">         <span class="label">             {fieldtitle}{validationsign}         </span >         <span class="field">             {field}         </span >         <span class="desc">             {fielddesc}         </span >     </div>


In html file, field are parsed like this:
Code:

 case 'checkbox':     $html str_replace('{fieldtitle}',"<label for=$row->name>$row->title</label>",$row->fieldstyle);     $html str_replace('{fieldtype}','checkbox',$html);     $html str_replace('{validationsign}',($row->validation_rule) ? ' *':'',$html);     $html str_replace('{field}','<input type="checkbox" name="form['.$row->name.']" value="'.$row->default_value.'" id="'.$row->name.'" '.$row->params.' />',$html);     $html str_replace('{fielddesc}'$row->description,$html);      break;


and I add a CSS (see attached file) this way in the showform function:
Code:

 $html='<link href="'$mosConfig_live_site .'/components/com_forme/forme.css" rel="stylesheet" type="text/css">';     if (!strpos($mainframe->getHead(), $html))         $mainframe->addCustomHeadTag($html);


Of course, it is not supposed to be the best way, only a draft...
File Attachment:
File name: forme-d76f9cbf74a2b5454c3d3144e1ceba9d.zip
File size:476 bytes
  The topic has been locked.
#512
alex (Admin)
Admin
Posts: 301
graph
Re:W3C compliance 2007/05/17 17:39 Karma: 8  
Thank you! i will keep that in mind.
  The topic has been locked.
#619
bobthebob01 (User)
Junior Boarder
Posts: 8
graphgraph
Re:W3C compliance 2007/05/22 08:23 Karma: 0  
hi globule,

is your hack working? have you tried it?
  The topic has been locked.
#621
globule (User)
Senior Boarder
Posts: 10
graphgraph
Re:W3C compliance 2007/05/22 09:40 Karma: 0  
Why souldn't it?
I didn't write this code directly in the forum, it comes from my files!
  The topic has been locked.
#771
bobthebob01 (User)
Junior Boarder
Posts: 8
graphgraph
Re:W3C compliance 2007/05/28 04:00 Karma: 0  
thanks for this hack.
but i am having some difficulties to implement:
for "form style" and "field code" = no problem.
but for the implementation of the css and how fields are parse i am not sure i know where to do it. also i see only the change to "checkbox", but is it exactly the same for all other type

thanks again
  The topic has been locked.
#934
globule (User)
Senior Boarder
Posts: 10
graphgraph
Re:W3C compliance 2007/06/26 23:16 Karma: 0  
You're right when you say teh example is only for checkcode. Do you really think I will publish my devs for free for a (now) commercial extension?
  The topic has been locked.
#937
bobthebob01 (User)
Junior Boarder
Posts: 8
graphgraph
Re:W3C compliance 2007/06/27 01:28 Karma: 0  
I hear you, i see your point.
it's also disappointing for me to see an extension going commercial once they get more or less stable.
you try, test bug track the product and work with the dev, go through the hassle of working with a non fully functional extension, and when it gets good; <<bang>> it becomes a paid extension!

i'd rather be asked for a donation than paid, event though it's not expensive.

my problem is now i have used forme for a important project that is about to go live, i don't have time to try/test a new extension for that.

but thanks again. maybe i'll start from your idea and work on it on my own. If i do, may i send it you so you can compare.

chers
  The topic has been locked.
#941
globule (User)
Senior Boarder
Posts: 10
graphgraph
Re:W3C compliance 2007/06/27 07:04 Karma: 0  
Sure, you're welcome!
  The topic has been locked.
_GEN_GOTOTOP Post Reply
© Copyright 2007 Best of Joomla, Powered by FireBoardget the latest posts directly to your desktop