How can I add sort on a custom added percentage field in Drupal 7 View?
Thanks for your help.
I'm not sure if you mean by 'custom added percentage field' however it shouldn't affect how views treats the field.
In views click 'Add' next to 'Sort Criteria'
Filter the list by 'Content' using the provided dropdown.
You should see the field in the list. Select it.
Click 'Apply'
Set the sort options as needed.
If that's too basic and the problem is that the field isn't shown in the list I'd suggest changing/adding a new question with more information.
Related
I am using admin-on-rest in my project. I am facing one scenario where I could not find solution. Could someone please help me in how to populate the list in dropdown based on another input value in create form. (Example: populate 'State' list based on 'Country' change like this).
This can be achieved using aor-dependent-input.
You can find an example in this codesandbox: https://codesandbox.io/s/5xwv91v4n4
Look for the PostCreate component which has category and subcategory inputs.
I'm a newbie in Drupal and I'm trying to create custom forms in Drupal 8 using 'YAML Form' module:
https://www.drupal.org/project/yamlform
I have added some 'select' elements with some custom options from the Form elements page provided by the module, but I don't find the way to populate these elements from database.
How can I do it? Step by step if possible, please.
Thanks in advance!
I don't know if it's the best way to do it but it works for me:
I've created a custom module and in the '.module' file I've implemented the hook hook_yamlform_options_YAMLFORM_OPTIONS_ID_alter() when the part YAMLFORM_OPTIONS_ID is the ID of a custom set of options I've added in the Options page (admin/structure/yamlform/settings/options/manage).
The code of the hook, basically, gets data from database and sets it in the $options array with the desired keys and values.
Then when I access to the Options page again, in the row of the new custom set of options, the column ALTERED has the value 'Yes'. Click to 'Edit' this row and then click to 'Reset' button. The result is that the options value/text table is updated automatically with the data returned from database.
there is a feature called "Filter Row" in Kendo Grid
http://demos.telerik.com/kendo-ui/grid/filter-row
I want to add a drop-down list instead of a text box or a number box, to the filter box. It's for filtering a column that has countries. So I want list of countries in a drop-down list. How can I do this?
It's very similar to the custom Filter Menu (http://demos.telerik.com/kendo-ui/grid/filter-menu-customization). I made the mistake of no using valuePrimitive: true. You might not want it in your situation but keep that in mind.
Here's a sample: http://dojo.telerik.com/OKaS
Also, the filter menu should take up the editor model of the column but it's not always what you want.
Edit
Starting from 2014 Q2 SP1, the template function now receives an object containing "datasource" and "element". In my example, you would have to change the dropdown initialization from "container.kendoDropDownList" to "container.element.kendoDropDownList". The datasource is empty in my example but I'm assuming this can be used to pass the choices to a control without requiring another datasource or to externalize your current. I have not experimented with this feature but I suggest you do before taking my sample blindly.
As Pluc mentioned earlier valuePrimitive: true will help you create a custom filter for your grid/columns to send id's to your controller, if you are not using setting this property true you will receive an Object in your controller instead of a number, the conversion will not be made automatically . This is still working as of 2019
I have a category "Year" in Tridion and it has keyword values listed 1900s-2012. I am trying to access the category in a component via a dropdownlist. The problem is, I am seeing values in dropdownlist in ascending order 1900s-2012. And user has to scroll all the way down to select the current year - 2012. Is there a way I can reorder keyword values in the category so users see the current year first. I have searched quite a bit, but found no answer on the web or in documentation.
Is it possible to specify the ordering in any dropdownlist created from a category used in a component or at the schema level?
There is no way to specify the order for a dropdown list without creating an eXtension (should be easy using jQuery).
What you could do is set the default value of the field to "2012" and that way the user has the current year selected and if they need to change to a previous year, they'll scroll up.
I'm working on an InfoPath 2007 form. I have two drop-down lists and i need the second to be populated with items bases on the value chosen in the first list. I use c# to populate the drop-dpwn lists from external sources. I've tried to use the OnChange event to make all this, but the second list is still empty.
If anyone knows, please tell me.
You can filter the entries for the second drop-down list based on your first list (but only if the entries are based on a data source, not manually entered).
Bring up the properties window for
your second drop-down list.
Select your data source.
Click on the button to the right of the Entries text box.
Select the repeating node you wish to use for the basis of your list entry.
Click the Filter Data button. From here you can enter a filter to limit the entries displayed based on the value of your first drop-down list.
Your question was a bit ambiguous. You may be trying to populate a secondary data source based off of your first drop-down list. This should work fine with an OnChange event. Can you post the code you are using to do this?
Some additional tips that may help:
The change event will not fire until focus moves off of the list box. So, for the second drop down to populate, you will need to set the first drop-down then hit tab or click elsewhere in the form.
I don't know the size or nature of the data source you are using for the second drop-down list, but you may consider downloading the entire data source and filter it using the method I described above. This may be a better solution as you won't need to make a database query between entering the first list box and the second one.