Dropzone js not working with another inputs - dropzone.js

I want to use Dropzone.js into a form with more than one inputs but it's not working properly.It's only working with a single form but not with more than one inputs in a single form. Is there any code which can help me...

Did you read this link? >> https://github.com/enyo/dropzone/wiki/Upload-all-files-with-a-button
It's a dropzone.js' tutorial explaing how to get all your form submit when you click submit button.

Related

Form validation not working with tabs x in yii2

I am using kartik-v tabs x. My paage has 3 tabskartik v tabs x
In each tab there is a form and a grid.
The form validation works in the first tab but not working in the inside tabs. The form is rendered using renderAjax. Also none of jquery work in the inside tabs.
Can anyone help here?
I could solve the above problem.
When you use tabs and there are forms in it. Each form should have a separate id.
Then the default YII validation works for all tabs
You have to use pjax;
inside the rendered view you have to add this:
Pjax::begin();
$form = ActiveForm::begin(
ActiveForm::end();
Pjax::end();
So u can use pjax for the validation. Let me now if it works.
I have 3 tabs and two of them have both a form and grid and the third only has a grid. The validation and submission all will work if you use different ids for your forms and your js function names should be different.

Can I create quiz GUI with Django-Forms?

I'm new to django, and I'm working on a quiz project. The idea is to create something similar to this (http://www.stylemint.com/quiz). Basically, there will be a question on each page and the user clicks on an image with the answer. I was planning on using a django form with a radio select input type, however, I'd like the image to act as the radio button (ie, be clickable) and also a click on the image will take you to the next question (instead of having to click submit after each). Is this possible with django, or do I need java?
it's perfectly possible - if you just want a series of images, and clicking on them to take you to the next question you might achieve that by:
Having multiple input fields of type "image" which all submit the form. If you go down that route you'll have to template the forms out yourself or make your own widget.
Using javascript to replace radio buttons with images dynamically. If you do that, it'd be a good idea to make it fall back to a straight list selection for people who don't have javascript.
Ignoring forms altogether and just using a view with a parameter of what the choice is.
Yes, it's completely possible. My suggestion is if you want to save the result in the db use model and model form in django. So, my next suggestion is you can customize model field for combine radio button functionality and image together. But actually you must programming and use a little jquery and javascript to do it.
You may want to see:
https://docs.djangoproject.com/en/dev/topics/forms/modelforms/
https://docs.djangoproject.com/en/dev/howto/custom-model-fields/

Different validation rules for different actions JSF

i'm trying to implement an edit/add profile page which looks the following:
image upload component (Tomahawk t:inputFileUpload) with upload button
several input text fields
cancel and save button
As said, this form is used for adding a new profile as well as editing existing ones. At first, i used two elements, one for the text input, one for the upload component. The problem with this is, since the upload componenet does not support ajax/ partial rendering, the whole page is reloaded and any changes on the text inputs is lost. When i use one unified , the validation is triggered on the textfields when the upload button is pressed and the user is forced to fill out all the inputs first, before it is possible to upload an image.
My desired behaviour would be, that if the textinputs are unchanged, i can still upload the picture while changes are being applied to the backing bean and validated. Validation on unchanged/empty fields should only be triggered, when the final submit button is pressed. How can this be done? Any standard scenario/best practice methods for this or do i have to implement a valueChange Listener? Thank you guys in advance and kind regards!
Solved the problem, i wrote a custom validator and checked for the action that triggered the submission of the form using this:
ctx.getExternalContext().getRequestParameterValuesMap().containsKey("form:uploadButton");
Where ctx is the current instance of FacesContext. Maybe this helps someone, it is a workaround however it does the job.

MVC 3 Form validation

I have an app that is using standard out of the box form validation so when a user clicks the submit buttons and there are required fields not filled in, the validation message pops up next to the empty field. This is great, however, because our form is quite long we also like to display the same error messages at the top of the page in a bulleted list or something. Is there a quick way to do that? I can't seem to find where the validation is getting triggered in the jquery code to add new code to it. Anyone have any suggestions?
Thanks,
Rhonda
I figured out a way to do this that was quite simple. I just put a div at the top of the page and put all the #Html.ValidationMessageFor(m => m.Email) for every field in that div. This way they show up in both places.
Rhonda

simpleModal to update form

To all:
I am trying to update a form input radio button(s) using simplemodal to display the div containing the radio buttons.
It displays correctly however when the modal is closed the change is lost.
is their a simple call back that can update my form?
Thanks in advance for your help.
Bob
Bob,
What exactly are you trying to do? By default, SimpleModal does not maintain form state. You can try adding the persist:true option to the modal, but there are still some issues with certain browsers.
-Eric

Resources