How would you design a form with many dynamic fields? - user-interface

We have a form that allows a user to dynamically add inputs for fields. For example if you have a form for tracking projects, you want to dynamically add tasks to that project. Just to clarify my language: you dynamically add inputs for the task field. The problem is, we have 50 of those fields. Our current solution presents all 50 fields with a plus (+) next to the field to allow them to add another input box for that field. The labels for the field are to the left of the field and each input box that is added goes below the current input box.
Please trust that dynamically adding inputs is the right solution, please trust that it has been thought out, please trust that this is what the users wants, please trust that we have gone down various other roads and this is the best solution.
My question is about presentation: How would you do it?
Please keep the answers to UI design. We already have the database schema figured out.
Update
Current Solution is a web based application that uses JavaScript to dynamically add new inputs and looks very similar to Corey Trager's drawing:
Task [.............] +
[.............] +
[.............] +
[.............] +
Foo [.............] +
[.............] +
[.............] +
Repeat 50 times...

So, what you described can look something like this? If not, can you try "drawing" it please?
Task [.............] +
[.............] +
[.............] +
[.............] +
Foo [.............] +
[.............] +
[.............] +
Is this a web page or other technology?

This may be completely off the mark, but depending on the requirements for the fields, and if this is the configuration or the data entry interface.
If the fields do need to be open for data entry, you could leave have them defined as a list of fieldnames and values, and use click-to-edit to dynamically place input boxes on each element as needed.
This solution could reduce visual noise as well as save vertical space. As you can see the form input takes up more space than plain text. You can cater for keyboard users by capturing tab events and triggering the next field's click to edit functionality.
It could look something like this. ( having just clicked on Foo to edit the content)
Name : Joe Blogs
Phone : 555-1234
Cheese : Stilton
-----------
Foo | SNAFU |
-----------
Bar : fubar
Fifty : Whatever
(+) Add new field...
OR
If this is a configuration page, ie where you add new fields to be filled in on another screen or stage in the process, you could define a list of fields sequentially, which are then displayed to the user for data entry.
-------------------------------------------------
Define Fields | name, phone, cheese, foo, bar ..(etc).. fifty |
-------------------------------------------------
Then the fields are displayed in a huge grid as per the current UI.

Thinking on from what #zachary suggested:
Display the form as it was designed to the user with the default/ last saved number of fields. At the bottom of the form place a DropDownButton that has a + icon and the words Add Field (+ Add Field).
Dropping down this button will show the list of all fields that are available. When the user selects one of these the form will grow (enough to house the new field) the new field with label will be displayed at the bottom of the form and the add field button will show below the new field.
Edit:
To follow on the theme of ASCII diagrams this was is what I think my suggesting would look like.
Task [......................]
[ + Add Task ▼]
Foo [......................]
[ + Add Foo ▼]

Little + icon somewhere near the last task field with a link that says "Add new task". When clicked, new task field appears below current last task.

I would use a drag-and-drop approach, allowing the user flexibility in positioning. This is possible even using a web-application. See, for example, Dropthings (http://www.dropthings.com/). This provides all the code you'd need to implement drag-n-drop in an ASP.NET environment.
What environment are you using?

If this is a web app then you could use Javascript to dynamically manage the additional fields. Depending on whether you can process the form asynchronously, you could use Ajax which would simplify some aspects of the form management.
Basically, each task would need an individually named and then you would need to append a new uniquely named form input element for each new field that they choose to append. Then you would have to loop through the form using Javascript before submitting the form or you would loop through the POST data after its submitted.
Of course, this introduces Javascript as a requirement for your web app which isn't always viable.

Ok, now that you've added my diagram to your question, my answer is....
I'm not saying this is better, but it's an alternative. Here's a different way that replaces horizontal scrolling with clicking. Instead of navigating from "tasks" to "foo" to "bar" by vertical scrolling, use "tabs", even if you have to stack them several rows high. It does make it easier to navigate in a random order. You could even switch back and forth from this tabbed view to your current "show all" view.
[task][foo][another tab][another tab][etc][etc][etc][etc][etc][etc]
[row2][fred][another tab][etc][etc][etc][etc][etc][etc][etc]
[row3][another tab][wilma][etc][etc][etc][etc][etc][etc][etc]
[task1 ]+
[task2 }+
[task3 ]+

Could you not use a system similar to that implemented by face book, that has a single textbox, but allows multiple items to be added to it? There are pre-coded solutions, such as this one, which is for mootools v1.2, or this one which is for jQuery. And you could even allow auto-complete of the tasks already in the system.

Related

Apex main region header with dynamic value

I have tried everything I know to make title of header replicate items value, including substitution string &P10_TITLE_TEXT. inside headers title property. Generally, this would work for normal region, but in my case I try to modify value of pages main region, which is rendering first, before any other item. My assumption is that title text is not showing because it cannot see items value yet.
Is there a simple way to refresh title header after items are ready, or perhaps another better solution?
PS: This is main header of the modal dialog page, that has no property for setting static id, and it's template is less adjustable then normal regions.
Try the following javascript in "Execute When Page Loads" of the modal page:
$('.ui-dialog-title',parent ? parent.document : document).text( apex.items. P10_TITLE_TEXT.value );
Pre-Rendering computations may be the solution here.
You can try creating a computation before Regions under Pre-Rendering to set &P10_TITLE_TEXT.. There will be no need to "refresh". This is if you are simply loading it once.
If you are trying to set headers based on input every time you change it, I would advise separating into two pages so you can submit the page and APEX can reload and process, or just use javascript.

News Show Pro GK5 pagination

I am using the following module extension in Joomla 3.0 to display articles: https://www.gavick.com/news-show-pro
The module displays articles in columns and slides to the next article on automation or with pagination buttons.
Problem: It always slides by the nr of columns.
Example: If you specify 4 columns and paginate it slides away those 4 columns to the next 4.
Is there an option which allows me to just slide one column away and display a new one at the end.
Apologies for the initial comment. Looked too quickly at the word "Pro".
This isn't a default feature with this module, however some core jquery hacks can be made to the module, although I'm not a fan of some sort of approach and would suggest using a different module. Below os a little something to get you started.
Firstly ensure you are using the jQuery engine rather than MooTools. To to this, in the Module setting, go to the External Files tab and set the Used Javascript Framework to jQuery.
Go to line 275 of the following the following file:
modules\mod_news_pro_gk5\interface\scripts\engine.jquery.js
where you will find this code:
jQuery($this.module.find('.nspArtScroll2')).animate({
'margin-left': (-1 * this.arts_current * this.arts_block_width) + "%"
}, $this.config['animation_speed']);
and replace it with the following:
var contentWidth = jQuery('.nspArt').width();
jQuery($this.module.find('.nspArtScroll2')).animate({
'margin-left': "-" + contentWidth + "px"
}, $this.config['animation_speed']);
You will now notice that the slide moves 1 article at a time, however the previous ones disappear. This is because of the active class. Only articles within the parent element with the class active are set to be visible. From here on, have a mess around with the CSS to set the visibility styling.
Hope this helps
Unfortunately this will not be added to the extension. Here is the belonging github issue:
https://github.com/GavickPro/News-Show-Pro-GK5/issues/214

howto create a devexpress GanttView like MsProject, with auto layout of dependencies

I really need help for creating a DevExpress XAF Windows application having a GanttView with special abilities including;
auto arranging of dependent appointments
resizing on holidays/not working times
hiding holidays/not working times, showing only working time intervals
please help, thanks in advance.
I will probably get hit with a stick over the head for "me too answer" but I have this task on my list for near future as I am working on something that needs to offer this functionality.
This is how I was going to approach this:
1. create BO to hold project definition or a query of some sort. Goo example to follow is how report module BOs are stored in the database.
2. create win or/and web editor for this type of business object.
3. the editor will contain either chart form charts module or scheduler view in gantt mode (depending on what you need)
As i get to this task myself I can provide more details or share an example.
here are some links to look at:
`
[http://www.devexpress.com/Support/Center/Question/Details/Q357411]
`
Main consideration for choices you have to make:
do you just need to display the view or interact with it too (chart control vs scheduler)
do you have to deal with source of the data that already has some schema you have to follow or do you have ability to model data as you want.

Magento - adding a new field to the product options in admin

I'd like to add a new tab to the 'catalog->manage products->product information' page in the admin. Underneath the 'images' tab, I'd like to add a new tab for video, with a simple text input for adding a video url, which I can then grab for the frontend.
Anyone any ideas where the files are that I need to edit? I've been looking for the last couple hours with no joy. I found the list of current options in Mage_Catalog_Model_Resource_Eav_Mysql4_Setup but can't figure out how to add to them...
Seems it gets some from Mage_Adminhtml_Block_Catalog_Product_Edit_Tabs. If I copy one of the tab sections here and change the title to Video, I can get it to display in the tabs on the left. But how do I then add the options for it?
What you are trying to do, from the sounds of it, is to create a custom field and add it to your catalog data. The good news is that you don't need to muck around in the PHP for that.
Head to Catalog -> Attributes -> Manage Attributes and create a new attribute for yourself called "Video URL" (or something to that effect). This will probably be a text field, and you may want to hide it from comparison on the frontend of the site (select "No" for all those boxes at the bottom of the form).
Once you've created an attribute, you will need to add it to an attribute set. If all your products are of one "type", and if you didn't create any other attribute sets, this should be only one step. Head to Catalog -> Attributes -> Manage Attribute Sets and create a "New Group" called "Video" and drag your new video url attribute into it. Save the attribute set and you should now have your new tab.
The only complication from what I read in your post could be positioning it underneath the images tab. Magento adds several tabs statically (the long way, in the PHP) and doesn't generally obey ordering of the tab groups. Consider the time tradeoff.
Hope that helps. Thanks,
Joe
Per your other comments, for the URLs a simple attribute would work but files would tend to be more difficult. To add a custom tab, as you said, you can edit (or in the case of a plugin, override) Mage_Adminhtml_Block_Catalog_Product_Edit_Tabs::_prepareLayout and add your tab. You'll need to add a block or template to display your tab contents.
After that, you'll need to store the data somewhere. Looking in Adminhtml/controllers/ProductController, you should be able to hook into the catalog_product_prepare_save event to get data from $event->getRequest() and push it onto the product or save another entity as necessary.
I'm not sure how well file saving semantics would work on a product, so you may want to do your own data storage in the extension and then provide something like a getVideoForProduct method to retrieve it.
Then the only thing left to do is modify the catalog/product/view.phtml template file to include your thumbs and create a controller in your extension to provide a modal w/ the video (or do it in JS).
I know that's a bit of a general answer, but it's the rough path you would need to take for tabs. Let me know if any specific part of that is unclear.
Thanks,
Joe

Facebook Game Function, Optimizin a Call, and Loading Bar

I am attempting to make a Facebook game and trying to replicate a common function that I usually find in many other Facebook game (a call to my website and illusionary image that is a loading bar).
The function should do the following:
User clicks on Button
Animated Gif Appears (Loading Bar)
Button Update User's Status
Animated Gif Disappears
Facebook Canvas page is updated
The code I currently have can be found at <dead link>
I am having trouble thinking of Step 2 and 4.
I need to optimize Step 5.
To clarify what happens on Step 5. I have Box 1 which has my stats. And Box 2 which has my points. I click on Box 1. This should update Box 1 with 1 points, and update Box 2; minus a point. (Clicking on Box 1, concurrently update both boxes)
I have successfully done this, but it is quite slow. I was wondering if there are alternative way that may be faster than what I am currently doing.
Script Updated with Mark-up. <dead link>
I've found a quick way to optimize the call. Rather than querying for data that I already have query, I will be using the first query to grab most of my data rather than querying it when I update.
It would help greatly to see the document markup (XHTML) where you have your elements and the calls to your javascript functions.
For steps 2 and 4 I recommend using the visibility attribute rather than display, or having the loading bar in an fb:js-string and using elem.setInnerFbml when you begin loading and once you have your response data, simply update it to the new content (you don't need an explicit loading_finish function in this case).
In your get_skillpoint function, you set parameters in an object and then you specify the action parameter again in the URL you are posting to as a URL query param - you may end up with one value overwriting the other, depending on how you access these values on the server side. I would recommend using different names for these two parameters if they are not the same. Also, why are you trying to send separate GET and POST variable sets? You should put everything in the POST and simply leave out the URL query string. I vaguely remember losing data that way in the past (vaguely, mind you).
If you can post your markup I'll update my answer with any light it sheds on the problem. It might be slow simply because Facebook isn't blinding fast when it comes to FBJS and AJAX. Also, FBML being returned must be preprocessed in the FB proxy before your app gets it, which adds a bit of lag; it's a bit faster to return JSON and just pull the data needed out of it, then place the appropriate pieces into an existing element or make use of fb:js-string.

Resources