Git Product home page Git Product logo

bootstrap-application-wizard's Introduction

Bootstrap Application Wizard

This project is no longer maintained. Open issues and PRs will not be resolved. Please fork if you wish to maintain yourself.

Screenshot

General

Author

Special Thanks

Update bootstrap v3.x

Contributors

Dependencies

  • jQuery 2.x
  • Bootstrap 3.x

Installation

CSS

<link href="bootstrap-wizard/bootstrap-wizard.css" rel="stylesheet" />

Javascript

<script src="bootstrap-wizard/bootstrap-wizard.js" type="text/javascript"></script>

Usage

1) Create wizard

<div class="wizard" id="some-wizard" data-title="Wizard Title"></div>

To set the title of the application wizard use the data-title attribute

2) Create wizard cards

Each .wizard-card will be its own step in the Application Wizard, and the h3 tag will be used for its navigation name on the left. Also notice the data-cardname attribute on each card. While not required, this can be used to access the cards by a specific name.

Card Setup

<div class="wizard-card" data-cardname="card1">
    <h3>Card 1</h3>
    Some content
</div>

Basic Wizard Setup

<div class="wizard" id="some-wizard" data-title="Wizard Title">
    <div class="wizard-card" data-cardname="card1">
        <h3>Card 1</h3>
        Some content
    </div>
    
    <div class="wizard-card" data-cardname="card2">
        <h3>Card 2</h3>
        Some content
    </div>
</div>

3) Initialize Wizard

After setting up the wizard with it's cards you can initilize it.

$(function() {
    var options = {};
    var wizard = $("#some-wizard").wizard(options);
});

Wizard

Wizard Options

Name Type Default Description
keyboard boolean true Closes the modal when escape key is pressed.
backdrop boolean or string `static` true Includes a modal-backdrop element. Alternatively, specify `static` for a backdrop which doesn't close the modal on click.
show boolean false Shows the modal when initialized.
showCancel boolean false Show cancel button when initialized.
showClose boolean true Show close button when initialized
progressBarCurrent boolean false
submitUrl string '' Default submit url
increateHeight integer 0 Deprecated
contentHeight integer 300 Default height of content view
contentWidth integer 580 Default width of wizard dialog, includes step navigation, which takes 28%.
buttons array cancelText: "Cancel"
nextText: "Next"
backText: "Back"
submitText: "Submit"
submittingText: "Submitting..."
formClass string form-horizontal Allows the configuration of the class(es) of the form. Default `form-horizontal` is set. Multiple classes are allow by separation of space.

Logging can be turned on by setting logging before wizard initialization

$.fn.wizard.logging = true;

Wizard Methods

Usage:

var wizard = $("#some-wizard").wizard({});

wizard.methodName(arguments);
Method Description
show() Displays the wizard
hide() Alias for close()
close() Closes the wizard
serialize() Returns all inputs from the wizard as serialized string, see [jQuery serialize()] (http://api.jquery.com/serialize/). Add-on: standard disabled inputs are not serialized. This function will will also serialize disabled inputs which have a attribute `data-serialize="1"`.
serializeArray() Returns all inputs from the wizard as array object, can be used for sending a JSON object to the server. See [jQuery serializeArray()] (http://api.jquery.com/serializeArray/) Add-on: standard disabled inputs are not serialized. This function will will also serialize disabled inputs which have a attribute `data-serialize="1"`.
getActiveCard Returns a wizardCard object for the active card
setTitle(title) Set the title of the wizard
setSubtitle(subTitle) Sets the secondary, less pronounced title in the wizard header
errorPopover(element, msg, allowHtml) This creates an error popup on element, with content msg. This is useful being called from a card-level validator, where you might want to pick specific elements on a card on which to show an error tooltip. allowHtml (default:false) allows html content as msg argument.
changeNextButton(text, [class]) Changes the “next” button (used to advance steps in the wizard) to have text text and optionally css class cls. This is used internally by the wizard when the last step is reached, to display a green “submit” button, but it may be useful elsewhere.
updateProgressBar(percent) Sets the progress bar in the lower right to percent complete. This typically shouldn’t be touched by user code, but it can be useful to call updateProgressBar(0) after a submit handler returns. [See Submitting Data].
hideButtons() Hides the next and previous buttons. This is only really useful after a submission handler returns. [See Submitting Data].
showButtons() Shows the next and previous buttons. This is only really useful after a submission handler returns. [See Submitting Data].
submitSuccess() Shows the special submit cards. This is only really useful after a submission handler returns. [See Submitting Data].
submitError() Shows the special submit cards. This is only really useful after a submission handler returns. [See Submitting Data].
submitFailure() Shows the special submit cards. This is only really useful after a submission handler returns. [See Submitting Data].
reset() Resets the wizard to its original state. This only resets wizard internals, and does not affect your form elements. If you want to reset those, listen for the `reset` event, and write some code to reset your elements manually.
find(selector) Search for the given selector within the modal. And returns the same result as jQuery.find(selector) function.

Wizard Events

You can register on the follwing wizard events with jQuery's on(eventName, callback) function.

Example registering on the reset event

var wizard = $("#some-wizard").wizard({});

wizard.on("reset", function() {
    // Some reset actions
});
<tr>
    <td>submitError</td>
    <td>Triggers when submit encounters an error</td>
</tr>
<tr>
    <td>loading</td>
    <td>Triggers after the submit event</td>
</tr>
<tr>
    <td>readySubmit</td>
    <td>Triggers when the wizard has reached its final card</td>
</tr>
Event Description
reset Reset event is called when the dialog is either closed or when submit is done
submit Triggers when the submit button is clicked on the final card
closed Triggers when the wizard is closed
incrementCard Triggers when the next card becomes the current card
decrementCard Triggers when the previous card becomes the current card
progressBar Triggers when the progress bar is incremented. The first argument passed to the callback is the new progress percent from 0 to 100.
submitSuccess Trigger when submit was succesfull
submitFailure Trigger when submit failed

Submitting Wizard

The easiest way to submit data to the wizard is to pass in a submitUrl on construction.

var wizard = $("#some-wizard").wizard({submitUrl: "/some_url"});

When the wizard reaches its last step and the user clicks the submit button, all of the inputs from all of the wizard cards will be aggregated together and POSTed to your submitUrl.

If you wish to implement your own submit listener, take a look at the source of the Wizard._defaultSubmit method, which is the default submit listener.

function(wizard) {
    $.ajax({
        type: "POST",
        url: wizard.args.submitUrl,
        data: wizard.serialize(),
        dataType: "json"
    }).done(function(response) {
        wizard.submitSuccess();
        wizard.hideButtons();
        wizard.updateProgressBar(0);
    }).fail(function() {
        wizard.submitFailure();
        wizard.hideButtons();
    });
}

The wizard class implements the serialize() and serializeArray() methods of jQuery form elements. These methods will scan through all the form input elements in your wizard cards, aggregate the names and values, and return a data structure for submitting via an ajax call.

After your submission, depending on whether your submission succeeded, failed, or had an error, you can display a specific hidden card to reflect the submission status. These submission cards must first be defined in the html.

<div class="wizard" id="some-wizard">
    <!-- normal wizard cards: -->
 
    <div class="wizard-card" data-cardname="card1">
        <h3>Card 1</h3>
        <div>...</div>
    </div>
 
    <!-- begin special status cards below: -->
 
    <div class="wizard-success">
        submission succeeded!
    </div>
 
    <div class="wizard-error">
        submission had an error
    </div>
 
    <div class="wizard-failure">
        submission failed
    </div>
</div>

These 3 cards are hidden by default and only appear when you specifically activate them. Typically, these cards will be activated by status of an ajax post.

wizard.on("submit", function(wizard) {
    $.ajax({
        url: "/wizard_submit_url",
        type: "POST",
        url: wizard.args.submitUrl,
        data: wizard.serialize(),
        dataType: "json"
    }).done(function(response) {
        wizard.submitSuccess();         // displays the success card
        wizard.hideButtons();           // hides the next and back buttons
        wizard.updateProgressBar(0);    // sets the progress meter to 0
    }).fail(function() {
        wizard.submitError();           // display the error card
        wizard.hideButtons();           // hides the next and back buttons
    });
}

By activating these cards in the ajax request handlers, you can display information relevant to the status of the submit request

After submission, you may wish to reset the wizard to some default state. See the [reset()] method in the wizard class for details on this.

Wizard Cards

Access

Cards can be accessed through the cards attribute on the wizard object. By default, this is an object whose keys are the text from the h3 tags, and whose values are instances of the WizardCard class. So for example, with the following markup:

<div class="wizard" id="some-wizard">
    <div class="wizard-card">
        <h3>Card 1</h3>
        <div>...</div>
    </div>
</div>

You could access this card the following way:

var wizard = $("#some-wizard").wizard();
var card = wizard.cards["Card 1"];

From this card object, you can call any of the card methods. You can also set a card’s name specifically by using the data-cardname attribute

<div class="wizard" id="some-wizard">
    <div class="wizard-card" data-cardname="card1">
        <h3>Card 1</h3>
        <div>...</div>
    </div>
</div>

Now you can access the card by the name “card1″:

var wizard = $("#some-wizard").wizard();
var card = wizard.cards["card1"];

Validation

Most wizard cards will require some kind of validation of the input before proceeding to the next card. This validation is not intended to sanitize malicious data to be trustworthy (this should be done server-side), merely to catch any obvious common problems with the data.

Validation can be attached inline to form elements by using the attribute data-validate on the input.

<div class="wizard-card">
    <h3>Card 1</h3>
    Name <input type="text" name="name" data-validate="validateName" />
</div>

When the Next button is clicked for the card, validateName will be called with the element as its first argument. Here’s an example validation function:

function validateName(el) {
    var name = el.val();
    var retValue = {};
 
    if (name == "") {
        retValue.status = false;
        retValue.msg = "Please enter a name";
    }
    else {
        retValue.status = true;
    }
 
    return retValue;
}

If the validator returns with an object with .status == false, then an error popup will display on the element and the wizard will not be allowed to progress to the next step. The wizard will only progress when all of the validators on the page return with a status of true.

Entire cards may be assigned a validation function by using the data-validate attribute on the card.

<div class="wizard-card" data-validate="someFunction">
    <h3>Card 1</h3>
    Some content
</div>

someFunction() will receive a WizardCard object on which you can manually search for the inputs on that card and validate them. This is useful for validating complex interdependencies between many inputs, for example, if a name field can only be empty if another field is populated.

The final method for validating entire cards is to subscribe to the the “validate” event and provide a validation function.

wizard.cards["Card 1"].on("validate", function(card) {
    var input = card.el.find("input");
    var name = input.val();
    if (name == "") {
        card.wizard.errorPopover(input, "Name cannot be empty");
        return false;
    }
    return true;
});

A card-level validation function is slightly different from an input-level validation function. In a card-level function, you are required to display any error popovers, using the wizard object’s errorPopover() method, as well as returning true or false to tell the wizard whether or not it should advance to the next step.

Validation Error Popup

Input with adjacent button

Bootstrap has the possibility to have button adjacent to an input. This causes the error-popover to be misplaced. To correct this the error-popover has to be placed on the span of the adjacent button.

To accomplish this the application wizard has smart detection for this. When creating an adjacent button to an input an additionial id has to be set on the adjacent <span> of the button. The id name of the span has to be btn-(ID OF INPUT).

For example within the following card setup. The card uses standard bootstrap v3.x code for an input with adjacent button. The id of the input is fqdn. The id of the adjacent span becomes btn-fqdn.

This will cause the error-popop to be correctly displayed when there is an validation error.

<div class="wizard-card" data-cardname="address">
    <h3>Address</h3>

    <div class="wizard-input-section">
        <p>Full Qualified Domain Name</p>
    
        <div class="form-group">
            <div class="col-sm-8">
                <div class="input-group">
                    <input type="text" class="form-control" id="fqdn" name="fqdn" placeholder="FQDN" data-validate="validateFQDN" data-is-valid="0" data-lookup="0" />
                    <span class="input-group-btn" id="btn-fqdn">
                        <button class="btn btn-default" type="button" onclick='lookup();'>Lookup</button>
                    </span>
                </div>
            </div>
        </div>
    </div>
</div>

Card CSS

If you require to display an selection box overlayed over wizard, like is done within the demo for some of the selects. You have to add the following class to your wizard-card element. wizard-card-overlay.

Card Methods

Method Description

Card Events

Registering event on cards can be done with the jQuery on(event, callback) function on the wizardCard object.

Event Description
loaded Triggers when the card is first loaded (when the card is selected but has never been selected before). This is useful for lazy-loading content.
validate when the card is being validated. The callback assigned to this can itself be used as a validator if it returns a boolean.
selected Triggers when this card is selected as the active wizard card
deselect Triggers when this card is changed from. The new card will receive the select event, and the old card will receive the deselect event.
enabled
disabled
reload Triggers when the card is first loaded or when the reload() function is called.
validate Called when the card is being validated. The callback assigned to this can serve as a validator itself, if it returns a boolean.
validated Triggers when validation is done
invalid Triggers when validation failed
markVisited Triggers when this card is marked as visited, meaning, typically, that the user can go back to it from a different step
unmarkVisited Triggers removing this card as a visited card

bootstrap-application-wizard's People

Contributors

asafyish avatar bluetidepro avatar bryancallahan avatar che-burashco avatar gjrtimmer avatar kachar avatar rentalhost avatar wong2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bootstrap-application-wizard's Issues

Form over multiple cards not possible

I am having trouble in submitting the form spanning over 4 cards. The previous card's fields are lost. Here's my HTML markup

<div id="wizard-demo" class="wizard">
  <div class="wizard-card" "data-cardname"="">
    <div class="wizard-input-section-first">
      <%= simple_form_for(@user, :html => {:id => "new_user"}) do |f| %>
           <%= f.input :username %>
           .....
    </div>
   </div> <!-- first card ends here -->

  <div class="wizard-card" "data-cardname"="">
    <div class="wizard-input-section-first">
         <%= f.input :first_name %>
           .....
    </div>
   </div> <!-- last card ends here -->
  <% end %><!-- form ends here -->
</div>

To cut long story short all the form fields are not submitted.

No License

Great work! Can you please put a license on this library?

data-onload attribute?

I am wondering if data-onload in demo page will trigger loaded event for card level? It seems this attribute is not working.

Is there a way to upload files included in wizards

I try to upload files but doesn't seems to work or in my case I don't know what is the workaround.

wizard.on("submit", function(wizard) {

        var formData = new FormData($('form:file'));
        alert(); //no alert
        console.log(formData); //no logs

    });

Trigger function applies wrong this context.

The Wizard objects trigger method has varying this contexts causing the _events array to be different depending on the caller. The method needs to handle whether the wizard card or the wizard is the this context and find the correct registered 'on' handler. The below code snippet handler fixes it.

var handler = this._events[name];
if (handler === undefined && this.wizard !== undefined) {
    handler = this.wizard._events[name];
}

So the whole method would look like the below:

 trigger: function () {
            var name = arguments[0];
            var args = Array.prototype.slice.call(arguments);
            args.shift();
            args.unshift(this);

            this.log("firing event " + name);
            var handler = this._events[name];
            if (handler === undefined && this.wizard !== undefined) {
               handler = this.wizard._events[name];
            }

            var ret = null;

            if (typeof (handler) == "function") {
                this.log("found event handler, calling " + name);
                try {
                    ret = handler.apply(this, args);
                }
                catch (e) {
                    this.log("event handler " + name + " had an exception");
                }
            }
            else {
                this.log("couldn't find an event handler for " + name);
            }
            return ret;
        }

Card Ajax Validation

i love this plugin. one thing that will be very useful, i think that you guys can add some feature that i can do card validation from ajax.

if you have provide, can you show me the documentation? thanks in advance 👍

Input type="file" - upload file on submission

Hello,

Your wizard is great, thanks for sharing.

Files upload doesn't work.
I know that it's tricky to submit a form with file to upload in it with Ajax, for security reasons.

Do you have a solution?

Many thanks,
Stitch

Error Popover html content possible?

Is there an option to put html content (e.g. a link) into the errorPopover?
Ithe bootstrap documentation says to just put "html:true" to the popover options. I already tested it and it worked, but I'm not sure if it would be a good idea to set it as default.

Better customization for buttons

Currently you specify the next, previous, submit, etc button text in the options when initializing a wizard. However it'd be ideal if you could instead specify the inner html, this way you can also include icons for the buttons.

Also it'd be useful if each card could specify what their own next button should look like.

Let me know if you guys agree with these features. I'm willing to implement them.

Error popovers still visible after clicking the back button.

Hi,

I am using a card with card-level validation and I noticed the following behaviour:

  1. I click next while having validation errors. The error popovers are shown.
  2. I fix the validation errors. Click next and go to the next card.
  3. I click back and go to the previous card. The error popovers are still there.

What do you think would be the most quick and efficient fix in this case?

Modal not showing in Bootstrap 3

I am having difficulty opening the modals in bootstrap 3. Right now the problem is that the div class has the class hide and in bootstrap 3, a modal with a class hide is, well, hidden. In bootstrap 2.3.2, it was shown....

Responsive Design

Great project! Bootstrap 3 is made to be responsive, with a mobile first approach. I tried the demo on the panopta site, but resizing the window had no affect on the wizard. Is this being taken into account with the Bootstrap 3 upgrade? Thanks!

Specify an #id for the generated form?

The FORM tag generated by the wizard is a simple <form>, with no other properties. It would be nice (I think) to be able to specify an ID value for the form as part of the wizard initialization, for either styling or jQuery purposes. For instance, I'm having some problems with an ENTER key press submitting the form with a GET; I can turn off the ENTER activity with a bit of jQuery, but the current process of telling jQuery where to find the FORM tag is a little messy.

Skip button for cards

It seems there is no feature like a skip button for specified cards. I think that would be a good enhancement for the wizard, so that the users can see that some cards/entries are not mandatory

Inline page instead of modal

I need to be able to use this control inline the page, rather than in a modal popup. I was able to write some code to make it work, but it should be a simple option on the control instead.

Here is the workaround code doing some DOM hackery with jQuery:

// the usual setup
var element = $("#some-wizard");
var wizard = element.wizard(options);

// detach the internal rendered element
var el = wizard.el;
el.detach();

// tell boostrap not to render a backdrop
el.attr('data-backdrop', false);

// remove the close button
el.find('.wizard-close').remove();

// this keeps the box the right height during submittal
el.find('.wizard-buttons-container').css('height', '30px');

// set some properties to make it appear inline
el.css('position', 'static');
el.css('margin-top', '20px'); // could be zero, but this looks better
el.css('margin-left', 0);

// place it where it belongs
$(element).after(el);

// show it
wizard.show();

Modifying buttons texts

If you just want to modify the button text for 2 buttons by example, you do something like:
buttons: {
submitText: "Create",
submittingText: "Creating..."
}

However, there is a problem! The merging code used will replace the content of buttons by your datas removing the others values.

To fix this bug, you need to replace this code: $.extend(this.args, args || {});
by that: $.extend(true, this.args, args || {});

I think it will be great to fix this bug inside the source.

best regards

Error popover on the same element

Hi,

First of all thanks for this nice wizard.
I found this wrong behaviour in the erroPopover function of the wizard. If you try to set two error popovers with different contents on the same element, the popover will always displays the first message.
I found this discussion on bootstrap twbs/bootstrap#813 (comment) ,and following what fat suggests i changed the bootstrap-wizard code to reset the popover content

    errorPopover: function(el, msg) {
        this.log("launching popover on", el);
        //resets popover data if a popover has been already instantiated for the element
        if(el.data('popover') != undefined) {
            el.data('popover', null);
        }

        var popover = el.popover({
            content: msg,
            trigger: "manual"
        }).popover("show").next(".popover");

        popover.addClass("error-popover");
        return popover;
    },

This fixed the problem for me.

Raffa

Escape issue

Add tabindex="-1" to the modal div otherwise escape keyboard action is not working:

No Validation on Final Card

Hello all.

I spent about an hour trying to figure out why zero validation functions (called at the card level or at the <input> level) were failing. They worked on previous cards, but never on the final card.

Is this something that can be looked at?

Thanks, this project is awesome.

David

Second time on wizard it don't display the cards

Hi, after clicking the first time on the wizard everything works fine. But if you close the wizard, them click again the cards are not loaded.

I'm calling:

'click .createNewStudyButton': function (evt) {
var newStudyWizard = $("#newStudyWizard").wizard({});
newStudyWizard.show();
}

Calling validate on a card on last step

How can you call a validate function on a card if it is the last step?
Since it is the last step the submit button is present so the validate function for this card does not get triggered.

wizard.cards["myCar"].on("validate", function(card) {

Issue with reloading wizard using ajax

I am trying to open wizard using ajax call everytime, but after re opening wizard next and previous buttons are not working.
The following code is working fine for the first time, but when i reload the wizard (using same ajax call) with out page refresh it is not working.
How do I reinitialize the wizard with out refreshing the page?

I am loading the content based on dropdown selected value.

<select id="dropdown">
<option value="1">option1</option>
<option value="2">option2</option>
</select>
<div id="someid"></div>
$("#dropdown").change(function(){
var selectedvalue=$(this).val();
$.ajax({
url: '/someurl',
data:{value:selectedvalue} ,
success: function (data) {
$("#someid").html('');
$("#someid").empty();
$("#someid").html(data);
}
});
});
Ajax call is returning the below html content from the partial view (ASP.NET MVC)

<div class="wizard" id="wizard-demo">
<div class="wizard-card" data-cardname="card1" data-validate="validations">
//Content
</div>
<div class="wizard-card" data-cardname="card2" data-validate="validations">
//Content
</div>
<div class="wizard-success">
submission succeeded!
</div>
</div>

//===== JS code used inside the partial view==========
var wizard = $("#wizard-demo").wizard();
wizard.show();
wizard.on("submit", function (wizard) {
$.ajax({
url: '/submiturl',
type: "POST",
data: wizard.serialize(),
success: function (data) {
if (data != "True") {
wizard.submitSuccess(); // displays the success card
wizard.hideButtons(); // hides the next and back buttons
wizard.updateProgressBar(0);
wizard.reset();
},
error: function () {
wizard.submitError(); // display the error card
wizard.hideButtons(); // hides the next and back buttons
}
});
});

Add Method 'find'

To access an element within the wizard. The version 2 code uses jquery find() within the wizard.el.

In v3, this is replaced by using the find() on wizard.modal.

This should be replaced by a wizard.find() function which redirects to jQuery find() and returns an modal.

Properties of the wizard should not be accessed directly.

wizard.reset(), wizard.trigger('reset') not doing anything?

Can't seem to get the form reset functions to do anything?

I wanted to reset the wizard after successful submission and have the reset working as expected when the close button is clicked...However, both of the following don't seem to do anything, regardless of where I place it (form submission, card selected, etc).

wizard.trigger("reset");
wizard.reset();

Settled on manually triggering a click on the close button for now.

Server response codes to trigger `wizard-error` and `wizard-failure`

Hello all,

What headers or JSON need to be returned by the server to trigger wizard-failure and wizard-error? And what is the difference between failure vs error?

Also, returning 200 response from the server still activates the error card. What kinda of a header or JSON response does the wizard expect for success?

Could you please add this information to the documentation?

Unusable in Chrome for Android on a smartphone

Unfortunately upon firing up the live demo in both Chrome & Chrome Beta for Android (on my Samsung Galaxy S3) I encounter the problem that once in a field I can't scroll around to see the other wizard steps or even the button I'm supposed to press to submit the form. Instead I have to keep zooming in & out to navigate around, which is very annoying indeed and makes it pretty much unusable in its present state, alas.

Wizard content not visible after closing and opening

Hi,

I want to open a wizard based on which button is pressed.
So, i have used the following code:

$(".button").on('click',function(){
var id= $(this).data('btnid');
$("#wizard"+id).wizard().show();
});

But when i click on button -> close modal -> reopen the modal, the wizard content disappears, it just shows an empty wizard.

[enhancement] Add missing bower.json.

Hey, maintainer(s) of amoffat/bootstrap-application-wizard!

We at VersionEye are working hard to keep up the quality of the bower's registry.

We just finished our initial analysis of the quality of the Bower.io registry:

7530 - registered packages, 224 of them doesnt exists anymore;

We analysed 7306 existing packages and 1070 of them don't have bower.json on the master branch ( that's where a Bower client pulls a data ).

Sadly, your library amoffat/bootstrap-application-wizard is one of them.

Can you spare 15 minutes to help us to make Bower better?

Just add a new file bower.json and change attributes.

{
  "name": "amoffat/bootstrap-application-wizard",
  "version": "1.0.0",
  "main": "path/to/main.css",
  "description": "please add it",
  "license": "Eclipse",
  "ignore": [
    ".jshintrc",
    "**/*.txt"
  ],
  "dependencies": {
    "<dependency_name>": "<semantic_version>",
    "<dependency_name>": "<Local_folder>",
    "<dependency_name>": "<package>"
  },
  "devDependencies": {
    "<test-framework-name>": "<version>"
  }
}

Read more about bower.json on the official spefication and nodejs semver library has great examples of proper versioning.

NB! Please validate your bower.json with jsonlint before commiting your updates.

Thank you!

Timo,
twitter: @versioneye
email: [email protected]
VersionEye - no more legacy software!

Making all nav-link clickable

Hi I was looking for a wizard form and I found yours that is perfect !!.
I had to modify the CSS to make it no-modal and now I want to be able to click a nav-link (in the left) to go anywhere I want. But I can't figure out how to do that...

Can you help me ?

Thanks for your work !

Possible to hide a specific card?

Hi.
I was hoping it would be possible to hide some specific cards?

I want to use 1 wizard but for 3 different uses.

i.e

My form has 3 sections
CLIENT - PROPERTY - VEHICLE

I want to have 3 buttons that all open the same wizard, but each button shows different cards within the wizard.

for example

$("#open-wizard").click(function() {
wizard.show();
wizard.hidecard('PROPERTY');
wizard.hidecard('VEHICLE');
});

$("#open-wizard2").click(function() {
wizard.show();
wizard.hidecard('VEHICLE');
});

$("#open-wizard3").click(function() {
wizard.show();
});

Its is possible? i tried wrapping some card within a div, then hiding that... but it didnt work.
Any help?

Disable close when clicking on background

How do I prevent the wizard from automatically closing when the user clicks anywhere else outside the wizard. I want this as a required form completion however since a user could theoretically click outside and close this I'd like to disable this.

IE 7+ Compatibility

Hello Andrew,

I just wanted to mark this as an issue because Bootstrap Modals are supported in IE7+ so this wizard should also be. I would be starting to work on it in a few days and would appreciate if we could together make it cross browser compatible.

In-case I get cornered with an issue - shall let you know!

Cheers!
Bagga

Plan for Bootstrap 3 ?

With bootstrap 3, bootstrap-application-wizard no longer works.
Do you plan to adapt it to this new version ?

Serialize Enhancements

When serializing with jQuery, disabled inputs are not taken into account.

However, sometimes, for example with the demo, an input is disabled to disallow user modification why it does contain an value which should be serialized.

A normal jQuery workaround is to enable all inputs prior to serialization to include all disabled values.

Personally, I disagree with such a implementation, because input values which should not be serialized will end up into the serialization.

Proposal:
Add a data-serialize="1" or similair option to the input fields to include this inputs always when serializing when they are disabled or not.

Card Skip

Option to configure a card to be skipped.

Proposal:
Adding a data-skip="1" attribute to a card root options in HTML.

On building a card the presence of this option is checked and a skip button is placed on the bottom toolbar.

The action of the skip button should be to ignore the validation of the card and go the the next card.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.