This question is somewhat building off of this one regarding how to add and view Many-to-Many relations.
I have one Model called Contacts with a Many-to-Many relation to itself (Children and Parents).
If I go to a Child Item, I want to be able to have a field called Parents, where I can select the Child's parents. Since the Model will have hundreds of contact items, a Multi-Select widget would not be practical. I need the suggest box functionality to make it easy to find and select the Parents. However, a Suggest Box alone just seems to be able to hold one value, so the question is, how can I use a Suggest Box to set multiple values that are easily added and removed? It would be like having the result of a Suggest Box added to a Multi-Select field.
How might this be possible?
Any assistance is much appreciated. Thank you!
Related
I am starting to build an app, using Meteor, that includes user-populated company profiles (including both financial data and text). I will be looking into a datafeed for public company information but much of the information for private companies will be user-populated.
I know I will need to create a form for the user to fill in so that the company information will be captured by the database. However, can I make this same form available to the user to both display the data and to allow them to edit the data in the future? Or do I need to build a separate view using tables for this purpose? My preference is the former, just one screen to create and edit as needed.
Any examples of similar instances would be very appreciated.
Thank you.
This is less of a meteor specific question, rather a general web technology question. Meteor can provide the data in the template of course, and it can offer events to process data and insert/update this to a database. This is the same as any underlying architecture. The question is really how to approach the problem with HTML & JavaScript.
A couple of potential methods:
Write your HTML to display the content in its non-editable form. Then provide an edit button to switch mode. When clicking this button switch on 'contenteditable' for the elements you wish to be edited: http://html5doctor.com/the-contenteditable-attribute/
Also reveal a save button, then process the event through meteor. Use selectors to extract the fields by referencing either designated class names, data attributes or name attributes. It would also be a good idea to alter the appearance of editable elements with a background or outline. The disadvantage here is that it's slightly non-standard and you may have the need for more complex data-types like dropdowns or checkboxes etc.
Create view with a standard form HTML. Style it in a way that shapes the information primarily for display rather than editing, eg. hide form field borders. Provide an edit button that when clicked alters the CSS and reveals form field borders, also reveal/replace elements which need more complex controls like dropdowns, perhaps turn on field labels too and of course a save button. The disadvantage is slightly more complex CSS and JavaScript.
a quick question on creating forms. I would like to know how to remove the what seems to be a "locked grid" on my fields when creating a form. In essence, when i create forms, all my fields seem to be linked and when I adjust the length or width of one, they all adjust respectively making it impossible for me to tailor my form to my needs. It seems to me that the only option around this is creating a form from scratch and inserting field by field. There must be a quick way to disactivate this feature once the fields are created within the form.
Thanks,
A
Select the Arrange tab from the Ms Access Ribbon.
Then, when your "locked grid" is selected press:
Is it possible in Drupal Taxonomy?
I've many pages related to consumer products to be in following vocabularies:
Electronics
Washing maching
TV
Mobile
Cars
Electrical
... all sorts of
Now Sony TV would go in TV and also in Electronics.
Is it possible to do it in Taxonomy ie to inherit from multiple parents which belong to different vocabularies.
Drupal 6 permits to set multiple term parents.
Adding multiple parents to a term will cause the segemntacaoTeste vocabulary to look for multiple parents on every term. Because multiple parents are not supported when using the drag and drop outline interface, drag and drop will be disabled if you enable this option. If you choose to have multiple parents, you will only be able to set parents by using the term edit form.
You may re-enable the drag and drop interface at any time by reducing multiple parents to a single parent for the terms in this vocabulary.
it is better to use other fields, e.g external Id, or rtid for referring to different vocabularies as compared to having multiple parents per term.
The drupal taxonomy system is not created to have terms that overlap each other. That would mess up the hierarchal order that terms are used for.
In your example, TV should be a child of Electrical, since all TV's are electrical.
I'm pretty sure, that author of this issue has found his answer, but in case if someone else still looking for such solution, this seems to be good start.
http://drupal.org/project/term_relations
I'm not sure how mature this solution is for D7, but if we want to avoid custom module creation, this should be best start.
I want to create a news application for my website.
My question is how should i create drag-able panels/canvas inside another panel/canvas.
What i exactly intend to do can be seen on netvibes.com . The website has different panels of every news group, and this panel could be moved from one place to other, but in a well defined manner. And the other panel take over the place of dragged panel.
Is there any component in flex, which can help me make something like that.
If i was unable to make my question clear, plz let me know, i will try to make it more clear.
Regards
Zeeshan
A TileList with drag and drop enabled should be able to accomplish something like that. Or, use a Spark List with a custom layout that you create.
It might be a bit tricky getting the list elements to drag and drop based on clicking the title, but it should be doable.
I think you should consider a more advanced solution with drap-n-drop with a custom panel based component. The places the panels can move can be implemented with a different custom canvas based component. The advantage would be to move the components into different custom positions and panels can be resized independent of each other.
Adobe has some good tutorials for drag-drop operations.
In my way of learning drupal, I got stuck in this issue. I have Taxonomy vocabularies that I set as tree with each node have different depth. Now, I need to display it in select box in a way that only one select(the parent terms) at first. On change, it will fetch term's children and display another select box below it. This goes until the last term doesn't have any children.
How do I do that in drupal?
I'm not sure I understand the question, but I think Hierarchical Select could help if this is a question about the UI
not so clear question, may be using http://api.drupal.org/api/function/taxonomy_get_tree/6 will be helpful.
[edit]
You can use the depth parameter to make sure that you only have the top level items in your first select. Then you can (through an ajax callback) get sub items using the parent parameter.