Get reference from button in HTML to use in a function in JavaScript

I’m working on a project using the Firebase and Firestore Databases (I’m brand new to this ). I watched this firecast. In that firecast he uploaded the file to storage once the ‘choose file’ button was pressed in the browser. However I want to upload it once I press the submit button on a form, not the ‘choose file’ button. The main issue I’m struggling to understand is how to link the file that was selected by the ‘choose file’ button and use it in the “submit” event listener. Can someone guide me on this?

ARRAYFORMULA + QUERY + IMPORTRANGE – Final cell reference in IMPORTRANGE is acting like it’s absolute when I need it to be relative

I know I’m chaining a lot together here, but it’s SO close to functional. Here is my formula with the doc address altered for privacy.

=ARRAYFORMULA(IF(ISBLANK($ AE$ 3:$ AE),(query(importrange(“″,”Brite Fills Lot Truncation!A1000:H”),”select Col2, Col6 Where Col1= ‘”&(’14 oz Bottles’!$ G3:$ G)&”‘”))))

In short, I want this formula to auto-fill into a sheet that collects responses for a Google Form. It cross references another sheet and returns data based on the value of the G column in my current sheet. The only issue is what is in bold above. This function ONLY returns the value that matches $ G$ 3 in my current sheet, acting as if it’s an absolute cell reference. I want it to be relative so that it fills each line based on whatever value is in the G cell on that row.

I would be thankful for any insight!

Document linked as column reference in list

I have a document library with 3 key values: “Company”, “Audit”, “Task”. I have a separate list with rows as “Audit” and “Task”, and columns as “company”.

the data set looks like this:

“Pre-audit” “Tax calc.” “Company1” “company2″…

“Pre-audit” ” deferred tax” “Company1” “Company2″…

“FYE” “Tax calc.” “Company1” “Company2″…

What I need to do is when a document is dropped in the doc library and given values for company audit and task, to automatically link to the list or create a record and link if the row does not exist yet.

Is this possible?

Thanks in advance!

import multi-value from csv into entity reference field from a field collection

I posted this question at but I have not got any replies yet. Below is the summary:

I have a simple csv file with 3 columns: NID|Key|List; where NID is the node id and Key was the unique value used to add field collections to the respective node. “List” is a multi-value field separated by “;”.

Example (csv file): NID,Key,List 1,2,text1;text2;text3 1,3,text4;text4 2,123,text1 ... 

Field collection has an entity reference field to a taxonomy plus other fields.

Field Collections: Field1: text; Field2: Term Reference; Field3: Entity Reference; <-- importer/tamper not working! ... 

The field collection fields were mapped correctly, except for the field that was an entity reference to a taxonomy. I configured Feeds Tamper with the Field Collection Feeds module but the entity reference list was not imported.

Does anyone has experience (suggestions) importing a multi-value field from a csv file into an entity reference field within a field collection?

Conditional Reference field value not passing in Rules via Fetch

I am trying to structure a rule that updates a new entityform submission conditionally with extra info from a different entityform type.

I currently have my rule set as follows:


After creating new entityform submission [entityform]


[entityform] is of type = submission Data Comparison: [entityform].type = EntityformType Data Comparison: boolean field = true  Entity has Field = ReferenceField  

The boolean field sets the condition to fetch additional information.

ReferenceField is an entity reference field created in Views, which references [Entityform2] by Submission ID.


Fetch by Property = [Entityform2] Type Loop Fetch by ID = [Entityform2] Submission ID Component  

Component has variables that need [EntityForm] and [EntityForm2.ID] to operate. It performs the necessary rewrites on [EntityForm].

Of course the problem here is that the two datasets aren’t linked in the rule. So, depending on how I reference Fetch by ID, I’m current either restricted to the first item in the list (attached to Entityform2.0) or the last (attached to the Loop, which keeps rewriting until it runs out of options).

Obviously, I should be pulling the ReferenceField from Conditions to set the ID for Entityform2, but it’s not working. I have tried:

Fetch by ID using ReferenceField as the value

Fetch by Property = Submission ID and ReferenceField as the value

Created variables based on ReferenceField and tried to fetch on value

Created variables based on the ReferenceField entityform-id and tried to fetch on value

But every time I try to insert value from ReferenceField, the component breaks.I feel like this should be a pretty straightforward fetch operation, but I’m stuck. Am I missing a step?

How to expose filter for entity reference as dropdown in the Search API view?

In my Search API view, I’d like an Exposed filter > Entity reference to be a select box, not a text field.


I have a view which I created like:

  • Views > Add new view > Show: default node index

So it uses the Search API index as a basis.

In the Search API I have ticked to index field_entity which is an Entity reference > Content_type: entity (confusing naming, I know).

I want the user to go to the views page & be able to filter the view results by field_entity (which is an exposed filter/entity reference).

The issue is the view shows the exposed filter as a text field. I have edited field_entity & checked the box Render Views filters as select list – this works fine for a normal view but not for a Search API view.


Can I somehow convert this text field to a select box?

To clarify, I cannot use custom or contributed modules on this project, so it needs to be done without using hooks, or other modules, etc.

Drupal 7, Search API Views

How to reference without tagging?

My problem is a priori simple: I would like in a node to refer to the terms of taxonomy that concerns this node, but without “tag” this node, ie: without the node is referenced in the list corresponding to the terms of selected taxonomy.

Indeed, currently, I use an “entity reference” field for “taxonomy terms”, and when I refer to a taxonomy term, the node is automatically tagged and appears in the list of nodes related to these terms of taxonomy.

Now, in other words, I would like to “quote”, “link”, but not “tag”.


I have a node: “Ernest Hemingway”, I would like to reference in this node the term taxonomy “The books of Ernest Hemingway”, which allows to link / access to all the books of this writer, but for all that, I do not wish the node “Ernest Hemingway” appears in the list “The books of Ernest Hemingway”, which is a list of books.

It sounds simple, but I do not find how!

Do you know how to do it?