This question already has answers here:
Symfony - retreive unmapped fields in nested forms
(2 answers)
Closed 2 years ago.
I've embedded a collection of forms like here: Embedding a collection of forms. Empty results
In my controller, I would like to access (get and set) unmapped fields, like view, new, edit, delete.
How do I do that?
I've tried dumping the form, but I couldn't find the submitted data anywhere.
You can just use
$request = Request::createFromGlobals();
$request->get('formname')['formfield']
to get your form values.
Related
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
This question already has answers here:
odata - combining $expand and $select
(2 answers)
Closed 7 years ago.
http://services.odata.org/V4/Northwind/Northwind.svc/
I'm trying to get all Customers, their Orders and corresponding Order_Details at once and using nested $expand for that. To query the data I'm using following link: http://services.odata.org/V4/Northwind/Northwind.svc/Customers?$expand=Orders($expand=Order_Details)
Now I'm trying to limit the data using $select. The problem is that I can not find the proper syntax to use $select for the middle table - Orders. I can apply it just to the top table - Customers and to the bottom one - Order_Details like this:
http://services.odata.org/V4/Northwind/Northwind.svc/Customers?$select=CustomerID&$expand=Orders($expand=Order_Details($select=UnitPrice))
Is it possible to use $select also for tables in between, in my case for Orders?
Thanks #nlips for his comment.
It is possible to use $select for the middle table by just separating select and expand with semicolon:
http://services.odata.org/V4/Northwind/Northwind.svc/Customers?$select=CustomerID&$expand=Orders($select=OrderID;$expand=Order_Details($select=UnitPrice))
This question already has answers here:
Add a New Item to a Table / List
(2 answers)
Closed 18 days ago.
I have a screen on which I am taking order number as an input from the user. Order has two part one the control information and other is the details (Line Items) I retrieve all the details (Line Items) in a table UI, and all control information in the associated fields.
I have made another portion on page which allows user to add any new line item in the details table UI. I made it workable up-till retrieving of details in the table but as soon as click the button to add new item in the table it is clearing all the previous details from the table and adding only the one which the user added last time.
I am using SAPUI5 API and oDataModel as the data model to retrieve the data from SAP
At the moment, you cannot just add a new row to the aggregation, if it is bound to the model. Instead you should add a new entry to the data and let the databinding update the table control according to the changed data.
But we are aware this is a problem for the ODATA model and probably you do not want to add a new record to the server but just to the view. This feature hopefully will be available for the next version 1.28.
Another workaround for now would be creating JSONModel from OData Model and update JSONModel data.
This question already has answers here:
Searching a particular index using Sphinx, from multiple indexes, through PHP script
(2 answers)
Closed 8 years ago.
In my case content are saving in table
content_en
Search with sphinx works good.
I would to add another table content_es and make search in this table.
And if user will be search on en version site - i would use content_en table, if on spain version - content_es table.
I can search in 2 tables and on PHP side make filter, but I think it's not correct.
How it's make correct ? (like $sphinx->SetOption() or $sphinx->SetIndex()) ?
$res = $cl->Query($query,"content_es");
This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
How to sequentialy access a dictionary??
I have a dictionary , I want to reitrive all keys in an array with the same order which exist inside the dictionary . The documentation on "allKeys" method of NSDictionary says the order of returned objects in array is not defined . What can be done to get the keys in the same order as that of the dictionary .
Thanks a lot in advance !!
So the question you were pointed to summarises the issue nicely, but the solutions offered could be a little bit too complex for your needs (if you didn't want / have the time to write a sub-class or your own data structure).
The quick and dirty alternative is simple to have an array that contains all the keys you want to access in the order you want to access them in. You can then simply match this array back to your dictionary to pull out values in the correct order.