How to add customization options like some card maker websites - ruby

I'm trying to build a prototype of a website which allows a user to customize the position, colour, tag and name of their business card.
I want to know how can I save the position of any draggable and droppable element in the rails database so that the user can save it for the future

You should add position field to data model. Also, you can use acts_as_list gem or implement similar logic by yourself

Related

Sitecore WFFM make 1 of 2 fields required

I'm trying to create a WFFM form and I need to set one of two fields to be required. Do I need to create custom fields? Or is this something that I can achieve with the module itself?
You could possibly use the Morph module, which you can download from the Sitecore Marketplace.
From it's description:
Selection-dependent inputs require users to enter additional
information related to an initial selection before they can complete a
form. In almost all cases, it allows making web forms simpler and more
responsive to user actions and personalizing forms depending on
visitors’ features.
If memory serves it uses the Sitecore Rules Engine to decide which fields to show/ hide based on inputs. However, I'm not 100% sure whether you can use the Required checkbox there, but worth a try.
No custom field types are needed. The WFFM Form Designer has a Required checkbox for each field row and most standard fields support this along with a custom validation message.

How create gmail like common control bar in Canjs?

For example we make a Gmail clone in canjs. Consider each item in the sidebar being rendered with a component of its own. Now I want a single control bar just like gmail to control the activities inside the components.
How should I approach it???
At present am looking at the change event of localStorage, is there a better solution to this???
I would recommend using an appstate Map or a page level component that holds the state for the features of your toolbar. If using an appstate, you could use can.route.map to bind certain features of the appstate Map to the route, so the state of your app can be controlled by the URL. A page attribute, for example, would control which main page is displayed (say, the message list or the contacts list.) You could then listen for certain values of page in your stache template to switch to showing the correct page. This snippet would show the message-list whenever the page attribute of the appstate is 'messages': {{#is appstate.page 'messages}}<message-list></message-list>{{/is}}
If you had more specifics of which feature is hardest to figure out how to implement, I might be able to give more specific advice.

Joomla - Rearrange layout of User Registration and Profile

Good day! I would like to ask how will I be able to re-arrange the layout of the user registration and profile page.
I am not describing adding/modifying fields, but to re-arrange them as to how this is rendered in the front-end. I will be using three fieldsets instead of the default one per plug-in, because they are subdivided into three.
You can override the "com_users" component's "registration" view.
To override the view, simply add a file in your template.
location:
TEMPLATE_NAME/html/EXTENSION_NAME/VIEW_NAME/FILE_NAME.php
For your case it must be TEMPLATE_NAME/html/com_users/registration/default.php
You can read HERE for more about overrides.

Adding custom fields to the article component

I've recently added custom fields to the article component using the documentation in the following url:
http://docs.joomla.org/Adding_custom_fields_to_the_article_component
Now this adds the custom fields defined to every new and existing article. Is there a way to define custom fields for specific article layout overrides.
Example:
If I have custom layouts for the category blog, (news, portfolio, events) can I define different custom fields for each category when creating a new article?
Kind of the way custom post types work in wordpress, or the way k2 component works, can this be done in joomla alone?
This is considerably easier to manage in K2 since the functionality is built in to do specifically what you want. It is trivial to assign extra fields to each category without having to go through the much more complex process described in your link.
However, if you want to stick with com_content, then you will need to create alternative layouts for displaying each category. You will still have all of the custom fields show up in the admin, but you can control the display on the front end with the alternative layouts. Here is the documentation (it's the same for 2.5) - http://docs.joomla.org/Layout_Overrides_in_Joomla_1.6#Introduction_to_Alternative_Layout_Feature_in_Version_1.6

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/

Resources