Umbraco DropDown List - content-management-system

I have a requirement to store a list of designers with logos and some bio information in my Umbraco CMS. I created a document type called 'Designer' with all those properties. I'd like to now create a dropdown list with those designer names so I can associate it with other document types. How do I create this dropdown? I'm using the v7 of umbraco.

Checkout nuPickers for Umbraco v7. Should have everything you need.
http://our.umbraco.org/projects/backoffice-extensions/nupickers
http://github.com/uComponents/nuPickers/wiki
http://www.nuget.org/packages/nuPickers
Look here for help with creating custom labels using macros
http://github.com/uComponents/nuPickers/wiki/Custom-Labels

As I understand, your intention is to let editors pick designers from the designers dropdown when editing content items in the backoffice.
If so, you may want to either use an existing data type called 'Dropdown' or create a custom data type.
If you only want the names in the dropdown, the default 'Dropdown' data type may suffice. Take a look at the article explaining how to customize the 'Dropdown' data type
Otherwise (say, if you want to show the avatar of the designer in your designer picker), you may want to implement your custom property editor (designers picker) and a custom data type related to it. Then you will be able to associate your data type with any document type you want.
A couple of useful links in this case:
how to create a custom property editor in umbraco 7
the demo which includes building a custom picker property editor to assign custom data to a document
Umbraco v7 XPathDropdownList implementation

Related

How to implement custom field to show a modal to add a new CRUD?

I need to make "add new" button on select2_multiple field. Which show a modal to add new item.
I have no idea how to implement this type of custom field.
You should check out https://github.com/webfactor/laravel-backpack-instant-fields - they've already created a field type with this functionality, but I believe it's only for 1-n relations.
Creating a new field type isn't difficult at all, it's just adding one blade file in your resources/views/backpack/crud/fields folder. Documentation here. That file will include all the PHP and JS logic you want. However, creating this particular field type will be more complicated, it will involve a lot of Javascript, and most likely an AJAX request to a route and controller method you create.
In Backpack v4 we plan for this to be an official feature. We're still 1-2 months away from v4, though.

How to customized fieds in moodle forms?

I want to customize moodle course/edit_form.php file and add some more fields and remove some existing fields. Is this possible to do without changing core files?
I followed this article but didn't find anything helpful https://docs.moodle.org/dev/Form_API
You can create a plugin that has a form which saves extra information about the courses and then you can show those fields by overriding the course renderer in the theme.

Prefilled notes of Class attributes in Enterprise architect

is there a way to have prefilled attributes notes in enterprise architect?
It should be something like this scenario:
1) I create new attribute
2) Enterprise architect prefill note of attribute with predefined text
Something like template for attributes.
Thank you for any advice
I know this won't help directly this question.
Anyways you can achieve it through an external addin.
All you need to do is handle the EA_OnPreNewAttribute and EA_OnPostNewAttribute broadcast events .
This isn't quite what you're after but it is possible to create an Attribute stereotype in a Profile and add to this a Tag with an initial value set to what ever you want. When you create an attribute with this stereotype, this means your predefined text would appear in a tag-value for the attribute rather than the note. Not ideal, but might work for you.
You could also have a go at writing some JavaScript to do this as well (under Scripting in EA). You'd have to use the JS to navigate the repository structure, find the attributes in question, and update their note. I don't believe you can attach a script to a UI event, so I think you'd be stuck running this post-hoc rather than having the note auto-populate on attribute creation.

Umbraco 7: custom dropdown dynamically populated from Items in a specific node

I have a "Language" document type, and under my site's Content I have a folder called "Languages" which contains all the languages we support.
I created a custom Data Type called "Languages Dropdown", and I want this dropdown to be populated from the instances of "Language" present at a specific path.
This is my default Sitecore thinking in action. Is such a thing even possible in Umbraco?
Certainly - first of all, take a look at nuPickers and see if that can do what you want - 99% of the time this sort of thing can be handled really easily with that package:
https://our.umbraco.org/projects/backoffice-extensions/nupickers
Documentation can be found here:
https://github.com/uComponents/nuPickers/wiki

How to add an autocomplete field in forms Symfony2?

Actually, I can assign a task to a user in the edition task. I display a dropdown list of all user in the system when I edit a task. Now, I would to be able to display a text input with autocomplete for user, and be able to add user if is not exist.
How to do that?
Thanks in advance.
Two things you need to do:
1) Create a Data Transformer
hich will let you use an input field instead of the default dropdown to the linked entity.
The Data Transformer basically transforms your input (in your case a username string) to actual user object that you can store with your entity. It will let you define an input field instead of the default dropdown to the linked entity. Have a look at the documentation, it's pretty straight forward.
2) Create the Ajax autocomplete
This can be done using any library you want (jQuery, Prototype etc.) on the client side, and server side you handle this in your Controller action and replies with either JSON or a rendered template. There are plenty of tutorials for this out there. The Ajax result could include a link to create a new user, if none is found.
The Data Transformer is what you need to focus on, and I would get that working before working on the UI.