Share

YUI Library

Tracker: Feature Requests

5 [#2378764] Forms Widget - ID: 1904422
Last Update: Comment added ( gpuckett )

A widget/module to create cross browser styled forms. A validation
functionality to create a form within 1 function. This should be for
<input>, <select>, <textarea> and any other usable tags that are used often
in forms. The button widget is nice, but needs way too much configuration
to quickly setup large forms.

I hope this makes sense, if not you can email me for more details (com
yahoo mvanleest_nl).

Something like:

YAHOO.util.Event.onContentReady("form1", function () {

var sideMenu = new YAHOO.widget.Form("form1", {type: "submit",
action:"/index.cfm?type=saveform" effect: { effect:
YAHOO.widget.ContainerEffect.FADE, duration: 0.25}
}
);

form1.render();

});


<form id="form1" action="">
<input name="textitem1" class="required pattern" type="text" />
<input name="textitem1_pattern" value="regexp pattern(or standard ones like
zip, state etc)" />

<div id="products" class="checkboxgroup">
<input name="checkbox" value="product1" />
<input name="checkbox" value="product2" />
<input name="checkbox" value="product3" />
<input name="checkbox" value="product4" />
<input name="checkbox" value="product5" />
<input name="products_maxcheck" type="hidden" value="2" />
</div>

<input name="checkForm" click="form1.validate()" />
</form>


Nobody/Anonymous ( nobody ) - 2008-02-29 04:09

5

Closed

None

george puckett

None

None

Public


Comments ( 4 )

Date: 2009-01-23 00:44
Sender: gpuckettProject Admin

The YUI project has been migrated from Source Forge to YUILibrary.com.
This ticket has been moved to the tracker on YUILibrary.com that
corresponds to the project it was filed against (YUI2, YUI3, Compressor,
etc.). All bugs not yet closed on Source Forge have been transferred with
their current state intact. The Source Forge version of all bugs are
being marked as closed to avoid confusion. You can track the
status/progress of this ticket on http://yuilibrary.com/ using the same
ticket ID as it held in Source Forge.



Date: 2008-04-21 23:02
Sender: kloots


Adding for documentation purposes:

http://blog.davglass.com/files/yui/dhtmlforms/



Date: 2008-03-26 19:02
Sender: miragliaProject Admin


From http://tech.groups.yahoo.com/group/ydn-javascript/message/27987:

Prototpe provides some really sweet form manipulation type functionality.

Including things deserialize etc.
I also continually end up writting functionality involving form
maniplaution. At my place of work i raised a jira to develop said form
API and the following represents my basic requirements:

YUI doesnt provide any real form manipulation type functionality. This
is a real inadequacy as forms are key element in almost all AJAX
applications.

This api will probably need to be modelled off a number of different
frameworks. We will be able to use YUI to do some of the work horse
functionality we just need to bring it together into a coherent form
manipulation object.

Requirements
1) Retrieve form field value in a generic way. Probably useful to look
at prototypes $F/Form.Element.getValue function
2) Provide a suite of serialize functions that turn html forms into
JSON objects. Numerous occasions where you send JSON objects to the
server rather than the fields or use json objects to make calls to the
server or generate http requests. Or manipulate the JSON objects
before turning them into a URL string.
3) Provide a suite of deserialize functions that populate html forms
from JSON objects
4) Provide a suite of functions that populate html forms from id based
span tags. More complicated than you think when you think about all
the possible form element types. Basically extracting data from a row
and populating a form with that data, providing duplicates in input
fields is messy, you should only provide hidden spans where the value
you want for populating differs from display value.

Need to provide toParameterString method that takes a JSON object too.



Date: 2008-03-05 07:24
Sender: miragliaProject Admin


Forwarding to Todd Kloots who is compiling the requirements for a YUI
Forms Utility.


Attached File

No Files Currently Attached

Changes ( 7 )

Field Old Value Date By
status_id Open 2009-01-23 00:44 gpuckett
assigned_to kloots 2009-01-23 00:44 gpuckett
allow_comments 1 2009-01-23 00:44 gpuckett
close_date - 2009-01-23 00:44 gpuckett
summary Forms Widget 2008-11-24 05:56 gpuckett
assigned_to miraglia 2008-03-05 07:24 miraglia
assigned_to nobody 2008-03-05 07:21 gpuckett