654 comments found.
Hi, I’m trying to set up a combobox that has a conditional logic.
ie) Country field is a combobox and when a user selects Canada, Province drop down is displayed. When a user selects US, State drop down is displayed.
I tried to use both combobox and conditional logic in one field but it doesn’t seem to work. http://doptiq.com/smart-forms/demos/samples/elegant/combobox.html http://doptiq.com/smart-forms/demos/samples/elegant/conditional.htmlCan you please help me what I should do to make this work? Thanks.
These are two approaches
The combo uses a normal select and jQuery UI has a select method which you can run to show and hide the province selects
You can either do this
$("#country").combobox({
select: function (event, ui) {
if($(this).val() == 'Canada'){
//Your code for showing the Canada provinces
} else if($(this).val() == 'US') {
//Your code for showing the US provinces
} else {
//Hide both province selects
}
}
});
Or this
Or this
$("#country").combobox({
select: function (event, ui) {
if(this.value == 'Canada'){
//Your code for showing the Canada provinces
} else if(this.value == 'US') {
//Your code for showing the US provinces
} else {
//Hide both province selects
}
}
});
Please make sure your option value matches Canada and US respectively (case sensitive)
And note that this does not require the conditional logic plugin
Hi, this works only if a user uses Country dropdown menu and select a country from the list. If a user just types “Canada” in the Country combobox instead of selecting “Canada” from the list, it doesn’t trigger the Canada provinces. How should I cover that case?
You can use other approaches to this such as keyup, paste etc on the input field its self so that if the user inputs anything you triger the change – though this is a tricky scenario
Have a quick question, could you please help me display the client IP address on the email your form generates and also have it post it on the csv file? If it can also put a date/time stamp that would be great. I know I have to place $_SERVER[‘REMOTE_ADDR’] somewhere but I dont know enough of PHP.
As always, thanks for your anticipated awesome support.
For anybody that reads this post, please know ELFLAIRE has always given great support. 5 stars service.
Once again I have to say. Great Job! Just a quick question, I have added about 20 extra fields but when I’m on the admin page looking over the details I can not see the extra fields. The information is posting like its supposed to, I just can scroll to the right to view the other columns. I know in mobile all the information will be there if I press the plus button but when I’m on my desktop and cuts it off. Any suggestions will be greatly appreciated
Did you add the fields to the CSV list? That could be the problem
Thanks for your always quick reply. Yes the form is working exactly as advertised. The csv list has been updated. I think its just a bug that when I login to the admin page to view the results on the online database, you can not scroll to the right if you add extra columns. http://mytnpr.com/survey/images/admin.jpg As you can see from the image, all the data is coming in but after the satisfaction column I have about another 15 columns that on a desktop environment do not appear. Once again, great job on all the updates.
Five star support.
OK let me look at the admin css
Hi
We recently purchased your package. We wondering if you would be updating your jquery 1.11+?
Thanks, Johnny
Hi Johnny,
The package should work fine with that version – have you found any bugs in regards to that version?
The reason i left 1.9 was for support of IE8, but it should be updated soon
Thanks
Hey,
I am wanting to implement your checkbox styles into my Logo Inspiration Generator Tool built in Gravity Forms (http://www.courtrightdesign.com/logo-design-inspiration-generator-tool/).
What is your suggestion on the best method to make this happen?
Hi Courtrightdesign,
You ca either use Javascript to add HTML wrappers to the checkboxes and then style them with CSS
If your checkboxes already have HTML wrappers then its very easy to add the styling
Thanks! I’ll give it a go.
I’m trying to add your “Flat” checkbox style to this Gravity Forms css (https://www.gravityhelp.com/documentation/article/css-targeting-samples/#checkbox-list). What is the css I would use to have this same flat style in red? Thanks again.
Can you post the sample markup that is generated for the checkboxes?
Thanks for your always quick reply. I think it’s one of these: https://www.gravityhelp.com/documentation/article/checkboxes-field/
You will have to change the checkbox classes of smartforms to match the wrapper and inside classes of gravity forms that way it should work
You removed the generator tool i wanted to know whether each checkbox input is followed by another element inside the list like a label or span – that way it becomes easy to apply the style
Thanks
Do you mind giving me a css example?
Here is the Logo Inspiration Generator Tool for your reference: http://www.courtrightdesign.com/logo-design-inspiration-generator-tool/
Thanks again
Ok let me work out something in that direction
Thanks so much
Anytime
Hi again Elflaire
I would like some advise regarding the use of a dynamic session variable within your javascript.
I have created the variable and tested that it is working by calling an alert… this is working fine.
The variable has been set within the javascript just after the function like so:
$(function() {
var mysession = "<% = session("MYSESSION") %>";
I need to use this numeric session value as the min numeric value for a textfield.
This is the rule for the text field:
theoffer: {
required: "#specialofferyes:checked",
min: mysession
},
However, if I enter a value less than the known session variable value into ‘theoffer’ text field and submit the form the field is not being validated correctly. IN other words it is not recognising that the value entered into the field is less than the session value.
Could you help with this at all?
I am not very sure of this but i am hoping something alongside these lines should work
1 – First of all you said your session value works and if that true we first call the session value like you did
THE SESSION VALUE
var mysession = "<% = session("MYSESSION") %>";
2 – Then we create a custom validation method which we shall test against like this below
THE CUSTOM VALIDATION METHOD
jQuery.validator.addMethod("minSessionValue", function(value, element) {
return this.optional(element) || (parseFloat(value) >= mysession);
}, "* Please enter a greater value");
So from the above script we test to see if our value is equal or greater than our session value. If its less then it should return an error message “Please enter a greater value”
3 – Then we test if our value is true with these rules
THE VALIDATION RULE
theoffer: {
required: "#specialofferyes:checked",
minSessionValue : true
}
NOTICE: – all this cant work without including the additional-methods.js script so you must include it on below the validation script
I mean these two scripts must be included
<script src="js/jquery.validate.js"></script>
<script src="js/additional-methods.js"></script>
Let me know if it works
Hi there Elflaire
I have added the sections of code to the javascript but it is not working correctly.
No matter what amount I enter into theoffer field it shows the error message?
Can you help at all?
Also, I need the amount entered into the field to be validated only if it is less than (<) the session value and not >=
I have copied the java below.
<script type="text/javascript">
$(function() {
var mysession = "<% = session("MYSESSION") %>";
jQuery.validator.addMethod("minSessionValue", function(value, element) {
return this.optional(element) || (parseFloat(value) >= mysession);
}, "* Please enter a greater value");
/* @date picker
------------------------------------------------------------------ */
$("#coursedate").datepicker({
numberOfMonths: 3,
prevText: '<i class="fa fa-chevron-left" />',
nextText: '<i class="fa fa-chevron-right" />',
showButtonPanel: false,
dateFormat: 'dd-mm-yy',
onClose: function( selectedDate ) {
$("#theenddate").datepicker( "option", "minDate", selectedDate );
}
});
$("#theenddate").datepicker({
numberOfMonths: 3,
prevText: '<i class="fa fa-chevron-left" />',
nextText: '<i class="fa fa-chevron-right" />',
showButtonPanel: false,
dateFormat: 'dd-mm-yy',
onClose: function( selectedDate ) {
$("#coursedate").datepicker( "option", "maxDate", selectedDate );
}
});
/* @custom validation method (smartCaptcha)
------------------------------------------------------------------ */
$.validator.methods.smartCaptcha = function(value, element, param) {
return value == param;
};
$(".errorsContainer").hide();
$( "#smart-form" ).validate({
/* @validation states + elements
------------------------------------------- */
errorClass: "state-error",
validClass: "state-success",
errorElement: "em",
/* @validation rules
------------------------------------------ */
rules: {
maxattend2: {
required: true
},
coursedate:{
required:true
},
specialoffer:{
required: true
},
theoffer: {
required: "#specialofferyes:checked",
min: mysession
},
gender:{
required: true
}
},
/* @validation error messages
---------------------------------------------- */
messages:{
maxattend2: {
required: 'Please enter a value'
},
coursedate:{
required: 'Please select a start date'
},
specialoffer:{
required: 'Please select Yes or No'
},
theoffer:{
required: 'Please enter a value LESS THAN THE COURSE PRICE'
}
},
/* @validation highlighting + error placement
---------------------------------------------------- */
invalidHandler: function(form, validator) {
$(".errorsContainer").show();
},
highlight: function(element, errorClass, validClass) {
$(element).closest('.field').addClass(errorClass).removeClass(validClass);
},
unhighlight: function(element, errorClass, validClass) {
$(element).closest('.field').removeClass(errorClass).addClass(validClass);
},
errorPlacement: function(error, element) {
if (element.is(":radio") || element.is(":checkbox")) {
element.closest('.option-group').after(error);
} else {
error.insertAfter(element.parent());
}
}
});
});
</script>
Hi Elflaire As you can see from my above comment the solution didnt work : ( Could you offer more advice please? The support had not expired when I had raised the question and the above comments : (
HI hadn’t looked at it let me do it tonight
You are a gentleman. Thank you : )
I was thinking what if we generate that value from the server end and put it in an input as a value – then test – theoffer value against our generated input value
Yes indeed. Sounds good. I am using classic ASP vbscript. Currently the session value is taken from a recordset value. So rather than creating a session you are suggesting that we create an input value such as a hidden form element as a value to test against? Could you give me an example please?
Here is an example
We have a field which will hold our value – if you were using php you would have to echo the session value but since i am not well convesant with ASP i guess you know how to go about it – alerantively we generate that value and set it via jquery / javascrip
So here is the field that will hold our value – we shall set this field off screen with css – please dont hide it with display:none
<input type="text" name="valuefield" id="valuefield">
Next we shall – set our value via JS this is a simple example
$('#valuefield').val("4");
Please note that i have set the value manually but for your case set it via session value – i mean something like this
var mysession = "<% = session("MYSESSION") %>";
$('#valuefield').val(mysession);
Next we have our field that will be filled – for thesting our value
<input type="text" name="theoffer" id="theoffer">
The validation rules
valuefield:{
required: true,
number: true
},
theoffer:{
required: true,
number: true,
min: function () {
return $('#valuefield').val();
}
}
The validation messages
valuefield:{
required: 'Please something',
number: 'Please numbers only'
},
theoffer:{
required: 'Please something',
number: 'Please numbers only',
min: 'Must be higher value'
}
Obviously you do not have to validate – valuefield – since its already pre-filled by default
Now i noticed another problem with our method – if someone types something like 11 – it validates as invalid since it considers single digit values only – 0-9 so we have to look into this
Hi Elflaire
Thanks for your help with this. Much appreciated.
Always happy to offer some assistance
hi elflaire, nice extension, working perfect and flexible. I just don’t seem to be able to change the currency from dollar to €, the slider and amount keeps failing after trying to change several settings for the mailer quote form. Can you help me out?
Thanks Aristotle25,
You mentioned you are using the mailer quote can you post / share the slider code so that i show you how to change that?
Thanks
- Changed the dollar sign to €
- i just see that the only change i tried is changing the dollar sign in the first ui val part:
.val("€" + ui.value); - i also see that this is the only location to make changes for the currency, i must have been tired.
- i suppose i have to change both these values: ”$” to “€”?
/* @budget slider
------------------------------------------- */
function createSlider(){
$( "#budget-slider" ).slider({
range: "min",
value: 50,
min: 250,
max: 25000,
step: 50,
slide: function(event, ui) {
$("#budget").val("€" + ui.value);
}
});
$("#budget").val("$" + $("#budget-slider").slider("value"));
}
Oh yes that was it the dollar sign in quotes is a string
neh it’s not working, changing the code like below changes the currency icon into this (also when moving the slider):
?
$("#budget").val("€" + ui.value);
}
});
$("#budget").val("€" + $("#budget-slider").slider("value"));
}
i meant a diamond shaped question mark
Hello
Using the actual euro symbol (€) may get rejected or result into a funny character with javascript
So the solution is to use the unicode value for the euro symbol
So change this
€
To this
\u20AC
That should work Thanks
Thanks wasn’t aware of those currency unicodes. Just a question, you have an admin panel included, is there a default login or perhaps a guide on how to make this work?
Hi Aristotle25,
The admin details are included in the documentation as well as the default login details and creating new passwords – please note that it uses salted passwords so you have to hash the password first
Thanks
Hey how can I disable certain day in a week on the calendar ? We will be closed for Tuesdays of all months. How can I disable it ?
Hello Desimc
The short answer
$("#datepicker").datepicker({
prevText: '<i class="fa fa-chevron-left" />',
nextText: '<i class="fa fa-chevron-right" />',
beforeShowDay: function(date) {
var day = date.getDay();
return [(day != 1), ''];
}
});
#datepicker represents your datepicker id
The long answer
The datepicker by default uses this numbering of days
Sunday = 0 Monday = 1 Tuesday = 2 Wednesday = 3 Thursady = 4 Friday = 5 Saturday = 6
Then the cycle repeats again
If we are to disable days of the week we need to follow that pattern in mind for example
Disable Sunday
$("#datepicker").datepicker({
prevText: '<i class="fa fa-chevron-left" />',
nextText: '<i class="fa fa-chevron-right" />',
beforeShowDay: function(date) {
var day = date.getDay();
return [(day != 0), ''];
}
});
Disable Monday
$("#datepicker").datepicker({
prevText: '<i class="fa fa-chevron-left" />',
nextText: '<i class="fa fa-chevron-right" />',
beforeShowDay: function(date) {
var day = date.getDay();
return [(day != 1), ''];
}
});
Disable Monday and Tuesday
$("#datepicker").datepicker({
prevText: '<i class="fa fa-chevron-left" />',
nextText: '<i class="fa fa-chevron-right" />',
beforeShowDay: function(date) {
var day = date.getDay();
return [(day != 1 && day != 2)];
}
});
Hope that helps
Thanks
Brilliant. Now one more silly question. Which file do I find #datepicker ?
Oh sorry
If you are using working forms with php that should be smart-form.js
If you are using the template files – that should be located inside the head section of your form HTML
Amazing stuff. I am using working form with php. I found smar-form.js.
It’s$("#date").datepicker({
prevText: '<i class="fa fa-chevron-left" />',
nextText: '<i class="fa fa-chevron-right" />',
beforeShowDay: function(date) {
var day = date.getDay();
return [(day != 0), ''];
}
});
Not #datepicker, otherwise calendar won’t show.
Thank you for great fast support. Amazing
What is the id of the datepicker field in the form index HTML / PHP Document? It should match that ID for it to work and make sure you have all the relevant scripts in the header for the form…
In case it fails just send me a link to your form
Thanks
Yeah its #date It’s working perfectly. Is there a chance we can delete certain dates in a month ?
Like which dates?
You can create an array of dates you want to disable and then disable them at will
Hi Can I disable 03/03/2016 disable as we are full house.
Set the array of dates to disable
var datesArray = ["2016-03-03"];
Call the array beforeShowDay
$("#date").datepicker({
prevText: '<i class="fa fa-chevron-left" />',
nextText: '<i class="fa fa-chevron-right" />',
beforeShowDay: function(date){
var string = jQuery.datepicker.formatDate('yy-mm-dd', date);
return [$.inArray(string, datesArray) == -1];
}
});
am i adding both these codes in smart-form.js ?
This is the current code:
$("#date").datepicker({
prevText: '<i class="fa fa-chevron-left" />',
nextText: '<i class="fa fa-chevron-right" />',
beforeShowDay: function(date) {
var day = date.getDay();
return [(day != 2), ''];
}
});
Tuesdays are disabled. Now I want to disable 3/3 also just for this week.
$("#date").datepicker({
prevText: '<i class="fa fa-chevron-left" />',
nextText: '<i class="fa fa-chevron-right" />',
var datesArray = ["03-Mar-2016"];
beforeShowDay: function(date) {
var day = date.getDay();
return [(day != 2), ''];
var string = jQuery.datepicker.formatDate('d-M-yy', date);
return [$.inArray(string, datesArray) == -1];
}
});
For that we shall create a fuction for all the dates to be disabled – here are the steps
THE HTML
Create the HTML withe the input ID (#date)
<input type="text" id="date" name="date" class="gui-input">
THE JQUERY
We first create an array of dates to disable minus weekdays (Tuesday)
var disableddates = ["3-3-2016", "3-11-2016", "3-20-2016", "3-25-2016"];
I used many dates in an array but you can just include one – [“3-3-2016”]
Then we create a fucnction that incorporates the array of dates to disable and disabled Tuesdays
function DisableSpecificDates(date) {
var m = date.getMonth();
var d = date.getDate();
var y = date.getFullYear();
var currentdate = (m + 1) + '-' + d + '-' + y ;
for (var i = 0; i < disableddates.length; i++) {
if ($.inArray(currentdate, disableddates) != -1 ) {
return [false];
}
}
var dayTuesdays = date.getDay();
return [(dayTuesdays != 2), ''];
}
Lastly create the datepicker instance with our function for disabling dates
$("#date").datepicker({
prevText: '<i class="fa fa-chevron-left" />',
nextText: '<i class="fa fa-chevron-right" />',
beforeShowDay:DisableSpecificDates
});
The entire script will look like this
var disableddates = ["3-3-2016", "3-11-2016", "3-20-2016", "3-25-2016"];
function DisableSpecificDates(date) {
var m = date.getMonth();
var d = date.getDate();
var y = date.getFullYear();
var currentdate = (m + 1) + '-' + d + '-' + y ;
for (var i = 0; i < disableddates.length; i++) {
if ($.inArray(currentdate, disableddates) != -1 ) {
return [false];
}
}
var dayTuesdays = date.getDay();
return [(dayTuesdays != 2), ''];
}
$("#date").datepicker({
prevText: '<i class="fa fa-chevron-left" />',
nextText: '<i class="fa fa-chevron-right" />',
beforeShowDay:DisableSpecificDates
});
This is really confusing me. Can you message me your email address so I can assign you control panel access. And if you could please help me sort this. Disable Tuesdays and disable 3/3 date. At the moment all Tuesdays are disabled as per your instructions and its working fine. Now I want to disable 03/3 date also.
Thanks
Okay I copied and pasted the last entire code. And it’s working. You are a genius. So I can add as many dates as I want ?
Many thanks. You’re a guru.
Thanks for the compliment and yes you can add as many dates as you want
I just bought it. But it requires code copy and paste, and have to understand the codes. It’s not a drop and done style. It’s hard for me to use. Can I get a refund? Thanks.
Hi Sanvinna,
Please contact envato support for the refund
Thank you
Hello, I got this error,
Warning: escapeshellcmd() has been disabled for security reasons in /home/llartcom/public_html/formularios/php/phpmailer/class.phpmailer.php on line 1142
Can you help me please ?
Thx a lot
Hi Mr-frontflip,
That is a server error for your shell script – please talk to your host to resolve the error
Hello, I’m looking for a way to add a “Check All” and “Clear” option for checkboxes. I went through the examples, but didn’t see anything like that. Did I perhaps miss it? Any help would be appreciated! =]
Hi Pbm001,
This feature is not included
The simple answer is this
The HTML
You have a checkbox to toggle (check and uncheck) all others
<label><input type="checkbox" id="checkAll"/> Check all</label>
You have a group of checkboxes to be toggled (checked and unchecked)
<div id="checkbox-group">
<p><label><input type="checkbox" /> Option 1</label></p>
<p><label><input type="checkbox" /> Option 2</label></p>
<p><label><input type="checkbox" /> Option 3</label></p>
<p><label><input type="checkbox" /> Option 4</label></p>
</div>
The JQUERY
$("#checkAll").change(function () {
$("#checkbox-group input:checkbox").prop('checked', $(this).prop("checked"));
});
Hello, I’m using your Combobox widget, but I can’t make the validation work for this element, while the other form elements are validating correctly.
I didn’t find a specific example of this in your documentation, can you please help me?
Thanks
Hello again, just found instructions regarding INPUT CUSTOM NAME and INPUT CUSTOM ID, which solved my problem.
Thanks anyway
Thanks Luigi,
I included that part to simplify the validation process of the combo
Does this support ContentEditable elements, or can it be made to do so? The purpose being so you can put links etc into the “textarea”
I believe you can add HTML elements into the text area Thanks
Does branching work with multipane? That is, can you trigger a pane change with branching? Also, is there any documentation for branching? Thank you.
Which component (multipane) is that?
Hello,
Is it possible to use the HTML <datalist> Tag ? I need an option to select a couple of pre-defined values but to also have the possibility to specify one myself. If yes, can you give me an example?
Thank you.
OK
Hi elflaire,
I am trying to use your combobox.
But i want to restrict value entered by user in the combobox to the select options available.
If value entered by user is not found in the combobox then the user should get an error message that no value found and should not be allowed to enter any other value.
Pls help me in how to do using combobox.
Regards, Amish
Hi Amish,
I haven’t tried your approach with a combo being that combos allow both selection and input.
Let me try it and see if its possible
Hello
I have a form with two calendars.
I was wondering how to use a date range where selecting Date 1 disables all dates before Date 1 ?
Hello,
Do you mean all dates disabling all dates before Date 1 in the same datepicker or in the next datepicker?
This should be the default behavior
Hi there
There are two date pickers on the same form. Start date for an event (date1) and an end date for event (date2).
Once date1 has been selected I would like date2 to open from that previously selected date (date1) and to have all dates before that date disabled.
Can i see a link to your set up it should work that way by default if you use onselect and close functions…
Yes of course… here’s the code:
/* @date picker
------------------------------------------------------------------ */
$("#coursedate").datepicker({
numberOfMonths: 3,
prevText: '<i class="fa fa-chevron-left" />',
nextText: '<i class="fa fa-chevron-right" />',
showButtonPanel: false,
dateFormat: 'dd-mm-yy'
});
$("#theenddate").datepicker({
numberOfMonths: 3,
prevText: '<i class="fa fa-chevron-left" />',
nextText: '<i class="fa fa-chevron-right" />',
showButtonPanel: false,
dateFormat: 'dd-mm-yy'
});
and the html
<div class="frm-row">
<div class="section colm colm6">
<label for="coursedate" class="field-label">Course <strong>START</strong> date <em> * </em> </label>
<label for="coursedate" class="field prepend-icon">
<input type="text" id="coursedate" name="coursedate" class="gui-input" placeholder="Start date" readonly>
<label class="field-icon"><i class="fa fa-calendar" /></label>
</label>
</div><!-- end section -->
<div class="section colm colm6">
<label for="theenddate" class="field-label">Course <strong>END</strong> date (leave blank if open)</label>
<label for="theenddate" class="field prepend-icon">
<input type="text" id="theenddate" name="theenddate" class="gui-input" placeholder="End date" readonly>
<label class="field-icon"><i class="fa fa-calendar" /></label>
</label>
</div><!-- end section -->
</div>
Let me create an example for you
Hi Elflaire, That would be great.
Thank you : )
Hi Elflaire, have you had chance to create an example for me to see please?
My apologies
THE HTML CHANGES
First of all you need to make this change to your HTML
Just below the input fields change this line below
<label class="field-icon"><i class="fa fa-calendar" /></label>
To this – you will notice that you forgot to close the icon tag properly above
<span class="field-icon"><i class="fa fa-calendar" /></span>
THE JAVASCRIPT CHANGES
Date Picker 1 JS #coursedate
$("#coursedate").datepicker({
numberOfMonths: 1,
prevText: '<i class="fa fa-chevron-left" />',
nextText: '<i class="fa fa-chevron-right" />',
showButtonPanel: false,
dateFormat: 'dd-mm-yy',
onClose: function( selectedDate ) {
$("#theenddate").datepicker( "option", "minDate", selectedDate );
}
});
Date Picker 2 JS #theenddate
$("#theenddate").datepicker({
numberOfMonths: 1,
prevText: '<i class="fa fa-chevron-left" />',
nextText: '<i class="fa fa-chevron-right" />',
showButtonPanel: false,
dateFormat: 'dd-mm-yy',
onClose: function( selectedDate ) {
$("#coursedate").datepicker( "option", "maxDate", selectedDate );
}
});
The rest stays as it is
Thanks
Awesome! The amended Java has fixed the issue. Thank you so much for your time. Much appreciated : )
Hi there
I need to close the modal pop-up but cannot find a close button feature on the example pages.
So I have followed suggestions above but cannot get the close button to work.
Any ideas would be appreciated:
Java: $(function() { $(‘[data-smartmodal-close]’).on(‘click’, function(e) { e.preventDefault(); var smartInactiveModal = $(this).attr(‘data-smartmodal-close’); $(smartInactiveModal).removeClass(‘smartforms-modal-visible’); $(‘body’).removeClass(‘smartforms-modal-scroll’); }); });
HTML: <button type=”reset” data-smartmodal-close=”smart-modal1” class=”button”> Close </button>
HI again… sorry for my message. I now have the close button working fine : )
OK
I am having the same issue as a few others in the comments where when I click the submit button nothing happens and I can see it looks like its pointing to #Finish. I am expecting my form to post to a PHP page to handle the data. Has anyone managed to figure out what is going on here?
Hi Azler,
Inside the PHP folder there is an example of posting with multi steps its a little different from the normal post since you post through the finish function of the multisteps plugin
Please look Here for a working ajax multistep demo
And here is the the way the js file is setup – demo js file setup
Now look at this section – named onFinished: function looks like this below
onFinished: function (event, currentIndex){
var form = $(this);
$(form).ajaxSubmit({
target:'.result',
beforeSubmit:function(){
},
error:function(){
},
success:function(){
$('.alert-success').show().delay(7000).fadeOut();
$('.field').removeClass("state-error, state-success");
if( $('.alert-error').length == 0){
$('#smart-form').resetForm();
reloadCaptcha();
}
}
});
}
Now if you look at that onFinished: function – all the sajax submit stuff is done inside there – thats all the difference with the non-multi step versions
Now also notice that – the order of script initialization is:
1 – initialize – multisteps (including ajax submit)2 – add the validate – just below multisteps
3 – lastly initialize other plugins
For more clarity – In the documentation i included an example with all the possible methods – just look at the ajax php section and find an area named – Steps Events, Methods, Validation
Thanks
The trouble is I am not trying to send a mail from at the end of the form. I want the data to be posted to another PHP page where I can manipulate it separately away from the form. The form is simply used to capture the data in the first place.
Is there any way I can modify the function to act as it normally would by posting the data to the post page instead of trying to execute it within the same one?
I have noticed that if you hit enter on the last form it does actually try and post it to the page I specified. Its just the last button generated by the wizard does not submit the data.
Sorry I appreciate if this was not built to function like this but I will need it to act in this way to meet the requirements of what I am trying to do.
Rob
Hi Azler,
How are you trying to handle your post function? Plain post or ajax post?
Hello I try to realise substeps inside of a Multistep form. Is this possible to have like two steps bevor going to the next step in the navigation view above?
Hi Mueller,
You mean sub steps inside the main step?
exactly! sub steps inside a main step! thanks!
Send me an email on my profile as i work around that to see how we can add these
Thanks