Using input[type=submit] for forms and deprecating a[type=submit] (Issue #332)

33 views
Skip to first unread message

Sean Gilligan

unread,
Apr 12, 2012, 3:50:27 AM4/12/12
to iui-dev...@googlegroups.com
There are still way too many Issues in the Issue DB regarding forms.

Several issues in form handling stem from the fact that iUI has been
using <a> tags like this:
<a class="whiteButton" type="submit">Submit</a>
to submit forms. The correct HTML method is the following:
<input class="whiteButton" type="submit" name="submitInput"
value="Submit" />

To clean up iUI form handling and eliminate these issues we should
migrate to the correct HTML way of writing forms.

I created Issue #332 for this proposed change/fix/enhancement:
http://code.google.com/p/iui/issues/detail?id=332

In order to make this happen we need to do the following:
1) Make sure input[type=submit] works in every use case we support
2) Update the CSS for dialogs so input[type=submit] will display properly
3) Update form-tests.html to include tests for input[type=submit]
4) Update all documentation and samples to use input[type=submit]

I've pretty much completed items #1, #2, and #2 on this clone/branch:
http://code.google.com/r/msgilligan-iui-dev/source/list?name=msgilligan-form-submit-issue332

We should continue to support the old way for backward compatibility,
but at some point that support code can be removed and apps can be
fairly easily updated to use input[type=submit].

We should also probably stop using a[type=cancel] to cancel dialogs, but
that is a relatively minor issue and doesn't affect the overall form
processing flow in iUI. Issue #117 can be used to track that change
http://code.google.com/p/iui/issues/detail?id=117

Better Form support was a major goal of 0.4.0 and this change is (in my
opinion) necessary to straighten things out. For that reason I think
the next release of 0.4.0 should not be a "final candidate" but should
be "beta3" and include the changes from my clone/branch and whatever
follow-on fixes are necessary.

Feedback, testing, patches, etc. would be greatly appreciated.

Thanks,

Sean

Michael nietzold

unread,
Apr 12, 2012, 9:37:34 AM4/12/12
to iui-dev...@googlegroups.com

Von meinem iDingens gesendet...

Am 12.04.2012 um 09:50 schrieb Sean Gilligan <se...@msgilligan.com>:

> There are still way too many Issues in the Issue DB regarding forms.
>
> Several issues in form handling stem from the fact that iUI has been using <a> tags like this:
> <a class="whiteButton" type="submit">Submit</a>
> to submit forms. The correct HTML method is the following:
> <input class="whiteButton" type="submit" name="submitInput" value="Submit" />
>
> To clean up iUI form handling and eliminate these issues we should migrate to the correct HTML way of writing forms.
>
> I created Issue #332 for this proposed change/fix/enhancement:
> http://code.google.com/p/iui/issues/detail?id=332
>
> In order to make this happen we need to do the following:
> 1) Make sure input[type=submit] works in every use case we support
> 2) Update the CSS for dialogs so input[type=submit] will display properly
> 3) Update form-tests.html to include tests for input[type=submit]
> 4) Update all documentation and samples to use input[type=submit]
>
> I've pretty much completed items #1, #2, and #2 on this clone/branch:
> http://code.google.com/r/msgilligan-iui-dev/source/list?name=msgilligan-form-submit-issue332
>
> We should continue to support the old way for backward compatibility, but at some point that support code can be removed and apps can be fairly easily updated to use input[type=submit].

I think we should not do this "backward compatibility".

This blows up the code and leave old code. And users are confused by old samples etc. and because there is no need to update the old syntax the problems still exists.

I think it is always better cut off all bad things and use only good things. And document this change very well in a migration guide is the better step. For users of iUI and for the developers.


>
> We should also probably stop using a[type=cancel] to cancel dialogs, but that is a relatively minor issue and doesn't affect the overall form processing flow in iUI. Issue #117 can be used to track that change http://code.google.com/p/iui/issues/detail?id=117
>
> Better Form support was a major goal of 0.4.0 and this change is (in my opinion) necessary to straighten things out. For that reason I think the next release of 0.4.0 should not be a "final candidate" but should be "beta3" and include the changes from my clone/branch and whatever follow-on fixes are necessary.
>
> Feedback, testing, patches, etc. would be greatly appreciated.
>
> Thanks,
>
> Sean
>
>
>

> --
> You received this message because you are subscribed to the Google Groups "iui-developers" group.
> To post to this group, send email to iui-dev...@googlegroups.com.
> To unsubscribe from this group, send email to iui-developer...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/iui-developers?hl=en.
>

Remi Grumeau

unread,
Apr 12, 2012, 11:31:57 AM4/12/12
to iui-dev...@googlegroups.com
For such "details": Amen.

For those (few) that gonna update their installation to latest 0.4 code, this migration will not be a big deal.

Sean Gilligan

unread,
Apr 13, 2012, 1:04:50 AM4/13/12
to iui-dev...@googlegroups.com
On 4/12/12 6:37 AM, Michael nietzold wrote:
> Am 12.04.2012 um 09:50 schrieb Sean Gilligan<se...@msgilligan.com>:
>
>> We should continue to support the old way for backward compatibility, but at some point that support code can be removed and apps can be fairly easily updated to use input[type=submit].
> I think we should not do this "backward compatibility".
>
> This blows up the code and leave old code. And users are confused by old samples etc. and because there is no need to update the old syntax the problems still exists.
>
> I think it is always better cut off all bad things and use only good things. And document this change very well in a migration guide is the better step. For users of iUI and for the developers.

Well, it's good to hear that you're not against the change I'm making
-- You're saying I'm not going far enough!

Given that we were about to put out a final candidate release of 0.4, I
don't want to yank a feature and break people's code at this time. I
hear what you're saying, though. Let's get feedback from a larger pool
of users and also see how these changes work in practice. Then in 0.5
we can remove supprt for a[type=submit].


-- Sean

Sean Gilligan

unread,
Apr 13, 2012, 1:27:03 AM4/13/12
to iui-dev...@googlegroups.com
On 4/12/12 8:31 AM, Remi Grumeau wrote:
> For such "details": Amen.
>
> For those (few) that gonna update their installation to latest 0.4
> code, this migration will not be a big deal.

I'm going to leave the backwards compatibility code in there. I already
wrote it and tested it that way. And I do think we shouldn't break
things in what was originally intended to be a "final candidate"
release. The extra code is about 10-15 lines, I'd guess and we can
remove it in 0.5 if we aren't given a compelling reason otherwise (e.g.
loud complaints or a serious issue with using input[type=submit]).

Anyway, at this point we've got:

Leave a[type=submit] support for backward compatibility: -1
Add input[type=submit] support: +3

So I went ahead and pulled these changes in to the main repo
<http://code.google.com/p/iui/source/list>:

Any testing would be greatly appreciated. Also, Remi can you please
check my CSS changes for any unintended side-effects?
The CSS changes are minimal and are in a single commit
<http://code.google.com/p/iui/source/detail?r=c06fe0ebb5d4b50b63952b0c3d3b4bc4ccfd21f7>:

I'm also going to update the "Forms 1" and "Dialog box" examples on the
styles-themes.html
<http://www.iui-js.org/documentation/latest/styles-themes.html> page.

So, if there are no major issues with this I think it's time for a
"beta3" release...

-- Sean

p.s. I used some actual hyperlinks in this e-mail - does that improve
readability for people or make it worse?

Reply all
Reply to author
Forward
0 new messages