Custom filter for ng-options list - angularjs-filter

I created a multiselect dropdown which is populated on the basis of an input element, any text can be entered into it and that text becomes the label of dropdown with some special text, these special text can be any of the planets name. Now I want to create a custom filter on this ng-option list so that only all the planets are sorted in the order of their planetary position inside the dropdown, other text may go above or below the planets.
Any Idea how to implement such a custom filter. I tried some of the options but when I return the list from filter I get infamous angualr error :"Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting!"

Related

Trying to display the export value of a dropdown menu selection in Adobe PDF

Let me start off by saying I have very limited knowledge of Javascript.
I've got a Dropdown menu called: CustomerType with 6 values in it.
Basically I just want whatever is selected in the dropdown to display again in another part of the PDF.
Can anyone help?
First set the properties on the dropdown to commit the value immediately. See image.
Then on the "calculate" script for the other field, enter the JavaScript below. You'll need to change the field names to your actual field names.
this.getField("myOtherField").value = this.getField("myDropdown").value;
You'll want to set the other field to read-only as well since the value is calculated.

Specifying Other Amount on Initial Web Page

I have a form that contains a drop-down selector for someone to choose from one of three items to make a payment. I am trying to add a fourth item so that someone can specify their amount on the initial web page before clicking the "pay with paypal" button I created.
The ID of my text input box for the "other amount" is: amount1
Is it possible to use the advanced variables section of the Paypal button generator to have the value for the amount be set to the value from this text input box.
option_amount3 is the variable name that refers to the fourth option in the drop-down selector, so can I do something like: option_amount3 = [some way to grab the value typed into the text input box]
Here's a link to the page:
http://freeonlinetherapy.net/index_dave.html
Please advise.....

How to delete empty element in popup list

I have a question about a suspicious behaviour in Forms Builder 10.1.2.0.2.
When I have a list object (pop up list) I can define some values in the attribute palette of the object.
So you can set a shown name and a value behind. In this little window to set the items of the popup list you get automatically a white empty item at the end of the list. When I click now on this empty item (you do so, when you want to add an item) Forms Builder automatically adds an new empty item at the end.
When I click this new empty item, Forms Builder adss another empty one ... and so on.
It´s very suspicious because, when I end this dialog with "OK", it will be saved and when I open the form (over web) I have at the end of the list one, two (or more) empty elements in list.
But I can´t delete this empty ones from the list in Forms Builder.
So my question:
how can I delete empty items in a popup list??
I try it with hit "del" button at keyboard or delete the set value for the item (I hope Forms Builder delete items without value). But all does not help.
ctrl+shift+<
or
On my german keyboard it is:
ctrl+< for deleting a line
ctrl+> (= ctrl+shift+<) for adding a new line
When adding the list elements and list values, make sure you only add the ones you need, if you need 3 elements in your list don't click on the 4th box in the property palette, this will add one more list element.
If you have a blank element and you want to remove it, the only way is to click on the property without clicking the "More..." button press on the "Inherit" button on the top of the property palette, this will reset the list elements and list values so you can add only the elements you want.
if you still have extra empty option then make sure of these:
1- make pop list item required
2- if its database item ... make sure you have yes on databse item and column name filled
3- make the column in table to have default value like '1'
hey perhaps you should try this ctrl+shift+,

limit the record displayed in a view using hook_views_query_alter

i want to change the number of items returned by a view. I changed the code as
$view->set_items_per_page(2);
in hook_views_query_alter();
But it is not showing the required result. But there is color difference after 2 records. Is it required any other settings I put my pager as off in view.
ie Use Pager:off . I want to use this on draggable view table. Is it possible?
Pls help me
if you are only altering the query programmatically and view exist then
1] Go to your view basic settings and click on item to display
bottom of your view you will get the 2 text boxes.
2] In first text box put the number you want, in your case put 2 and leave second text box 0. and hit the update default display button and save your view.

Can I make QCompleter complete inline and show a popup

Qt 4.5 (PyQt 4.6.1)
I'm looking for a widget similar to a QComboBox that automatically filters its entries to the ones starting with the input in the text field. There are around 300 items in the combo box.
I've tried two approaches:
QLineEdit with QCompleter
Advantages
Filtering the items works.
Disadvantages
Doesn't show a popup if the text field is empty.
Doesn't do inline completion.
Allows to insert items not in the list.
Editable QComboBox with insertion set to no
Advantages
Nice popup
Completes inline in the text field.
Disadvantages
No filtering
Input is only possible in either the text field or the popup. Clicking on the popup doesn't select the best-matching item in the popup.
What I need
A popup to select the items.
Slow tippers should be able to start tipping the name of an item and the popup switches to the best matching one.
Preferably I should filter the items so that only partially-matching items are shown.
Concerning you first try with QLineEdit, you can set the completionMode to do it inline.
For your second try, you can add a QCompleter object to you QCombBox in order to filter your items as you want.The QCompleter member of the QComboBox is to offer an easy way to use QCompleter.
Anyway, if you are not satisfied with this method, you can manage a QCompleter object by yourself. This allows you to choose how item list is display (using any views) and to define items order in the list. See basic QCompleter details.

Resources