Carousel w/ form in slider doesn't submit with data-slider attribute on .item

reggi
创建于
2014-03-11 22:43:33

When you have a form within a carousel and slider .item has the attribute data-slide the form within does not submit.

I've killed a lot of time tracking this down, and I'd really like to prevent anyone else from making this logical mistake. I've recreated it here. I know I shouldn't have used a data-attribute that was used by bootstrap, but for it to prevent submitting the form was unexpected. I'm assuming there's a event.preventDefault() on anything with that attribute (or nested within it).

4条回答
cvrebert
回复于
2014-03-11 23:13:42
#1

Could you use GitHub Pages so that it's easy to view the example live?
That said, having a form within a carousel in the first place sounds rather weird.

reggi
回复于
2014-03-11 23:24:01
#2

@cvrebert It's pretty useful for a) two part forms b) showing a success message and removing the form. Original use case was within a modal where space was limited. Here's the pages:

cvrebert
回复于
2014-03-11 23:37:55
#3

Presumably it's caused by:

e.preventDefault()

hnrch02
回复于
2014-09-16 04:19:22
#4

Well, we can't change the name of that attribute and we also can't remove the preventDefault call, so I'm closing this as a won't fix and say that you need to use a different attribute than data-slide.

当前位于第1页,总计4 条回复

推荐相似问题

Don't we need a label-sm to match input-sm?

Just curious, when using .form-horizontal and .input-sm don't we need a .label-sm too to match things up, or am I missin
讨论数 3
bootstrap
创建时间:2014-03-11 21:05:50

Bootstrap and phone orientation - not switching from col-xs-* to col-md-* on horizontal

I'm trying to position form buttons using Bootstrap responsive layout grid. That code part looks like: <div class="row">
讨论数 15
bootstrap
创建时间:2014-03-11 20:43:36

retina-image() mixin inside media query

This LESS code: @media only screen and (min-width: @screen-tiny) { .foo { .retina-image("lores.png", "hires.png",
讨论数 4
bootstrap
创建时间:2014-03-11 16:42:59

Dropdown button bug when PrototypeJS is used

Hi. I am switching an old application that uses Prototype to jQuery and Bootstrap, but because of the amount of work it
讨论数 4
bootstrap
创建时间:2014-03-11 16:23:54

Color preview in customize page in getbootstrap.com

Hi This is a suggestion. bootstrap is one of a wonderful project that I've seen but i think if the customize page has a
讨论数 2
bootstrap
创建时间:2014-03-11 16:02:30

new feature - Gallery (images / videos)

Hi I want to suggest adding a new Javascript feature - Gallery. Currently I need to add separate plugins to have a "view
讨论数 2
bootstrap
创建时间:2014-03-11 08:20:11

Bootstrap sidebar links are not contracting & collapsing properly

Stackoverflow: http://stackoverflow.com/questions/22319474/bootstrap-sidebar-links-are-not-contracting-collapsing-proper
讨论数 3
bootstrap
创建时间:2014-03-11 08:15:02

Feature Request: Auto-recalculation on download page

This one is for the download page (http://getbootstrap.com/customize/): Recently I had a bug on one of my sites where a
讨论数 2
bootstrap
创建时间:2014-03-11 02:25:57

Deprecate all property mixins?

Mixins like .translate(), .rotate() and so on are deprecated? It looks like it's mistake. Just change the properties in
讨论数 5
bootstrap
创建时间:2014-03-10 20:42:47

Single input in input group losing rounded corners

Input and input-group render differently in terms of margins etc. To keep all inputs the same width I have put everythin
讨论数 8
bootstrap
创建时间:2014-03-10 16:51:47