Jquery mobile- Multipage template validation - templates

Am having 3 pages. On click of each page's next the page will be validating the current page for required field check, numeric check and move to next page.
My question is on final save on the 3rd page, can we validate all the 3 pages together as we do for each page.?

Yes, a multipage is no different to a single page from that point of view. If you are using a multipage, then all fields are visible from any of the virtual pages.
Update:
I don't know what you are using to do the validation. All I'm saying that that the multipage DOM is visible from all virtual pages, because you are actually just using one page. jQuery Mobile only shows a part of the bigger page as a virtual page, but you are still using one HTML DOM.
This is probably a hack, but if you have a multipage, then you can let your form span across more than one pages. So the page div's can actually go inside the form. Here I posted a example to show that you can access the elements across your multipage doc: https://stackoverflow.com/a/10686795/828757

Found the solution:
$.validator.setDefaults({
ignore: ""
});

Related

Typo3 / blank Templates

I'm a greenhorn with typo3 templating. Actually I'm using "bootstrap_package" (standard layout). I would like to create a sub-page without logo, menu and footnote. I just want to have the content elements on a blank page. How do I do this? Can anyone help me?
Best regards
cgroughy
You should give some more information why you need such a special rendering to get some more detailed help.
The usual reasons for such a page are design flaws as there are more suitable solutions inside TYPO3.
In general: You need to create a new page rendering, where you switch off the generation of the HTML header.
add on:
make a page where you collect all the pages which should be available in this special rendering. This page should be a subpage from your root-page. regarding relaurl: [x] exclude from path
in this page create a typoscript template record.
as these pages need only one rendering I propose to modify the default page object instead of creating a new page object (with a new typeNum).
in the setup field of this template record remove all headers with:
config.disableAllHeaderCode = 1
You might need to disable further CSS and JS, especially if they are loaded at the end of the page.
if you need another html-markup than the default you can modify the configuration here: wraps, (fluid-)templates, ...
Then add your special pages with content.

Kentico - Editable WebPartZones on children pages?

I added a WebPartZone in the master page at the top pf the master page, this web part zone is a message bar that will display on all the pages but could be different on each page. Is it possible to have a web part zone in the template that is editable on each page? Or is a different way to do it?
Thanks
The short answer no. From the template engine prospective whatever editable in the master - is not editable in its children. All editable web parts/widgets editable on the master, are not editable in its children.
If you really want to have an editable text in the master and all its children, you probably need to clone and customize web part and form control it is based on. Or create you own web part.
P.S. You can have editable text in your page template so all page that use this template will have this editable text working.
If you can give more details on what kind thing you want to edit would be easier to provide an answer
P.P.S. You can have a work around but it will not be with editable text. You will have to edit message text at the form tab. Would that suits you?
You can add the webpart on your master, and use a macro to get the content, like {%CurrentDocument.GetValue("Message")%}, but you have to add a field to each page to store the message in.
Just throwing out one more option, if what you want to display changes from page type to page type, you can put a repeater on the master page, put a path of a period (current document), then use macros to set the page type to the current document class name and the transformation to currentdocument.classname+".mastermessage"
Using a macro, then add a transformation "mastermessage" to each page type it will encounter, then you can change the fields and format for each page type.

django - how to make clickable html text that sends data to model?

I want to display users around 10 clickable html "tags" (just text with some css that changes when clicked) on my form page. I want them to be able to select a maximum of 3 tags but no minimum requirement. I then want to take the sum of all clicks for each individual tag and do some calculations with them as a model method, like return the 3 most clicked tags.
It's important that my tags are on the form page and are submitted at the same time as the form. So I guess they have to be part of my form.
How would I go about doing this? An actual example would be tremendously helpful as I'm still very new to django and find the documentation (which I've looked at) somewhat hard to understand.
If you know the tags ahead of time, I'd recommend this setup:
Use a multiple select widget in your form (see the favorite_colors field in this Django widgets example)
Use Select2 or another JavaScript library that converts <select multiple> inputs into a tags-like UI
If you go that route, this widget from django-select2 looks like it should get you off to the races.

Multi-page django form - slider or FormWizard?

I have a long form that I want to break into multiple pages.
I am evaluating between two options for presentation:
Present the form on multiple pages using the FormWizard
Present the form on a slider like CSS3 slider.
The slider is actually just one page long using CSS3 to give impression of slides. It floats all of the content areas next to each other, hides the overflow, sets page width to say 500% if we have 5 slides, and moves the left-margin -100% to show the next slide. So it is all one page but seems like the form is being shown on sliding pages.
To me the advantage of slider approach is that there is only one form and the user submits the form only once at the end of slides and thus can go back and forth to make changes.(This is will be a common case).
Versus having mini-Forms for FormWizard and submitting them after each page. To me, FormWizards seems complicated especially if the user wants to change any of previous page responses. I also need FileField on my form pages and it seems like FormWizard accepts FileField only on the last page.
However, I have not seen many folks use this sliding forms (CSS3 or JScript one) approach. Hence, as a newbie, I am wondering if there are some obvious pitfalls of doing this?
I can only write about FormWizard as I have used it before. According to 'Handling Files' section of Django documentation which can be found in
https://docs.djangoproject.com/en/dev/ref/contrib/formtools/form-wizard/
a FileField can be used in any step of your FormWizard implementation. What I found really helpful by using FormWizard from Django, is that it provides you all the standard functionality of Forms. That means that you can easily create and manipulate forms, validate fields in each step, etc. I am not aware of how CSS3 slider accomplishes validation, but I guess that validation should take place on client side.
Additionally, Django's FormWizard uses either a Cookie storage backend, or a Session storage backend in order to store information, which makes the navigation between steps and modifying previous stored data pretty trivial.
I hope I helped you in your decision! A lot more information can be found of course in the Django documentation of FormWizard in the link I provided above.

default text in mediawiki new pages

Does anyone know how to make mediawiki automatically populate a new page with some text when the edit button is clicked for the 1st time? I have tried the MediaWiki:Newarticletext page but this only affects the text that is displayed when a user visits a page that doesn't exist. I would like to provide my users the option of a pre-built template type page that doesn't require them to type in a lot of text that will be very similar on many new pages.
I don't think mediawiki templates are the way to go as they just imclude the text when the page is rendered and they don't provide the text for the user to customise.
thanks
Have you tried MultiBoilerplate? You can se this to load default pages - and you can create multiple default. The only problem is that it won't load when you create the page but just after (you need to press Load).