Zend jquery form autocomplete popoulate data in 2 fields - zend-framework

I have Zend autocomplete field, there I can add City name, my question is how to populate data from the list in 2 field, in 1 value and in 2 (hidden) id;
$this->view->autocompleteElement = new ZendX_JQuery_Form_Element_AutoComplete('cmp_name');
$this->view->autocompleteElement->setJQueryParam('source','/client/search');
I think this is possible because I pass array
[{"id":"2","value":"2","label":"Vardenisas!!!!!"},{"id":"23","value":"23","label":"Vardas"},{"id":"32","value":"32","label":"aaaaaaa"}]
If someone know how to in one click pass in 1 filed label and in 2 (hidden) id ?

Related

Magento 2 : Add custom filter to options class select ui component

In Magento 2.4 I have a table with following fields: ID, Label, CategoryId, StoreId.
I want to put this info in a AdminUi grid on which I'm using inline edit.
I'm allowing webmaster to only change CategoryId from the grid. CategoryId column is a select component and I have a class to bring options for that select CategoryOptions.php!
My problem is that I see all categories (I have 2 different websites on Magento instance with 2 different set of categories) in that dropdown generated by the CategoryOptions.php class when trying to edit a line (using inline edit).
I need to filter the category options for each grid line by the StoreId param which is known for each line.
Anybody could please help me with this issue?!

How to change manfacturer dropdown to multi select in Magento 2

I need to edit the manufacturer input type from dropdown to multiselect.How to do update this from admin?
screenshot:
http://s33.postimg.org/zdhzam5wv/Capture.png
note:
this is duplicate question of In magento how to change the Manufacturer attribute input type from dropdown to multiselect from admin but i have no idea how to do it at magento 2.
there is no option in Magento2 to change attribute input type from dropdown to multiple select
however you can delete and create new attribute with same attribute code from admin.
or If you want to change same attribute than you need to change it directly in Database as below
: frontend_input = 'multipleselect' and backend_type = 'varchar'
Yes, frontend_input should be 'mulitselect' and you need to update your frontend_model to 'Magento\Eav\Model\Entity\Attribute\Backend\ArrayBackend' and NULL out the source_model in the 'eav_attribute' table.
The other 2 answers are both incomplete. So here is a combination of both
Replace YOUR_ATTRIBUTE_ID_INTEGER with your attribute_id like 355
UPDATE `eav_attribute` SET `backend_model`="Magento\\Eav\\Model\\Entity\\Attribute\\Backend\\ArrayBackend",`backend_type`="varchar",`frontend_input`="multiselect", `source_model`=NULL WHERE `attribute_id`=YOUR_ATTRIBUTE_ID_INTEGER LIMIT 1

Drupal 8 - Repeatable Form Fields

I am looking to build a module in Drupal 8 after having used Joomla. The issue I'm having is that I can't seem to find a way to configure additional fields where required. Similar to this method in Joomla if possible so that I can add more of the same fields e.g multiple contact number boxes.
It is recommended to use Paragraph instead of field collection for Drupal 8 projects.
Check
Field Collection
It's drupal entity based module that allow you to create repeater fields.
You can create group of fields and embed them into existing content types.
example:
Your Collection:
Item 1:
title
body
image
Item 2:
title
body
image
Add another item

Copy Field contents from one Table to another table - FileMaker

I am new to Filemaker pro. I am working with Filemaker pro 13.
My database contains 3 tables:
category (fields = _pkCatID & CatName)
subcategory (fields = _pkSubcatID , _fkCatID & SubcatName)
books (many fields including _fkSubcatID)
I have no problems in conditional value lists, so making two popup menus in books layout for categories and subcategories was successful.
But I want to put both categories and subcategories in one menu/sub-menu using 2empowerfm Menu Popper plugin.
I created a new field in subcategory table to store a calculation to be used in the value list of the plugin.
The calculation is = CatName & ">" & SubcatName & ";" & _pkSubcatID .
So the returned value when choosing in books layout will be "_pkSubcatID".
The problem is CatName is not in Subcategory table, and if I choose it from the related table Category, I can't make the calculation "stored" which is a requirement to use a field in a value list.
So, I need to copy the field CatName from category table to a new created field in subcategory table. I don't know how to do it.
You just need to create a lookup field in your subcat table pointed to the category name in the category table.
Create a field in the sub-cat table called "Category"
Click on Options
Auto-Enter Tab at the bottom, check "Looked-up value"
Select the correct starting (subcat) and related (Cat) tables and select the name field for the Category.
That is all.
To populate this for existing records click into the _fkCatID field on a subcat layout after showing all records and in the menus select Records->Relookup Field Contents
#Michael Wallace answer is correct and that solution should work.
I'd add however that if the table is likely to become large (and it could do if you're cataloguing books for a library) then I'd suggest you run some tests on a fake large data to see if this menu technique holds up (especially if you are serving over a network). Running two global search fields with an executeSQL lookup for subcategory within category would be more efficient in a big data set - this technique is well described here and other places:
http://forums.filemaker.com/posts/c4ed6f9923

Display on a view fields values from different forms - Lotus Notes

I have a main form which contain an embedded view. This embedded view is displaying field values that exist in another form. How can i display fields that are in the main form and fields that are in the other form on the same ordinary view?
Firstly, your View Selection formula needs to select documents created with both forms
SELECT Form = "Main" | Form = "Other"
or you can use a short-hand version
SELECT Form = "Main":"Other"
Then you need to enter a conditional formula in the column where you want to display values from documents created with both forms
#IF(Form = "Main" ; FieldName1 ; Form = "Other" ; FieldName2 ; "")
although, as only those two forms are permitted, you can shorten that too
#If(Form = "Main"; FieldName1 ; FieldName2)
Hope this helps,
Phil
You could emulate the view in a rich text field, using the technique I describe here:
http://www.bleedyellow.com/blogs/texasswede/entry/dynamictables
You need to modify the code to get both your "main" document and your "other" document, and combine them together into one row. This way you can display values from different documents (even one "main" and multiple "other" documents).
It would work something like this:
Create temp document with rich text field.
Get the first "main" document and "other" document(s) associated with it (doc.Responses if they are child documents).
Create a new document using the row template form, and put values into the different fields.
Render the new row document into the rich text field on the temp document.
Repeate above steps for each main document.
If you only have values from one other document displayed on the main form, there's no need to use an embedded view to display the values. You could use computed text to display the values from the second document along with values from the main document.
If you need to view multiple documents and want to include values from the main document in the embedded view on the same lines as the other documents, I would recommend having the values from the main document be stored on those other documents, rather than trying to put the other document data on the main form (since there would be multiple other documents, requiring multiple field values on the main).
That said, if the field values are already on the main form, why do you need to display them a second time on those lines in the embedded view? After all, it would repeat the same value on every line in that column.
Visualize it in sql format:
Form A:
EmpNum | Name
Form B:
Name | Project
Can I have something like this in Lotus Notes:
SELECT *
FROM Form A, Form B
WHERE Form A.Name = Form B.Name