I have a content type that that has several dependent fields and several taxonomies as fields. Two of the taxonomies are not being written to the database all of a sudden. These fields are conditional based on the value of the another taxonomy field. The dependent taxonomy fields are not written to the relevant field_data_field_[taxonomy_name] table in the database; that is, there is no line in the table linked to the node. The other depended fields and other taxonomy fields in the content type work fine. This seems to be related to the combination of taxonomy and dependent.
No relevant errors are showing in dblog.
This used to work a couple months ago and I've tried retracing my steps from changes that I've made over that time but I can't find the cause of the problem. I haven't touched the field dependencies settings, which for these two problem fields are:
Condition: Value
Values input mode: Insert value from widget... (with the appropriate taxonomy term selected from the dependee field)
Drupal 7.34
Conditional Fields 7.x-3.0-alpha1
Have any of you encountered a problem like this? Where should I look next?
Changing the dependency value from "select from widget" to "regular expression" seems to resolve the problem.
Related
I've created a dropdown box in layout mode of filemaker and specified a field to pull in. However the box is remaining blank and not pulling in any of the information from the field in the table. What can have been missed for this to happen?
Most probably it is the problem with the value list set up or the relationship you are using to pull in the data for your drop-down.
If you are using a value list from a related data, place a portal based on the same relationship on the same layout and see if data comes through. If it does not - resolve your relationship first.
If you are pulling all values from a field in the same table, make sure in the value list setup you select the same relationship as the one the layout based on, the target field is selected and "Include all values" option is checked
If you notice when typing the title of a question in StackOverflow, SO will attempt to suggest questions that already contain the answer. Right below the title itself.
For e.g.
I am trying to do something similar in CakePHP 3.1 for a model called Companies.
For Companies,
I want to auto-suggest possible existing companies based on the name field right below the name as well.
See the form below
If you notice, there are 4 words supplied. Wuhan, Electric, Co, Ltd
I want to fetch a list of possible existing companies which have names containing at least one of the words Wuhan, Electric.
In terms of MySQL query, it will be something like
SELECT id, name from companies where name
WHERE MATCH (name)
AGAINST ('Wuhan Eletric Co Ltd' IN NATURAL LANGUAGE MODE);
In my mind, I need the following:
a way to implement the autocomplete
an endpoint for the ajax to collect a list of possible companies
For 1, my googling led me to find typeahead.js http://twitter.github.io/typeahead.js/examples/
My questions for typeahead.js are:
a) can I separate the display of the fetched results separate from the text input of the name field?
b) which type of typeahead should I use? Options include remote dataset, custom templates, etc.
c) should I even use typeahead.js? Should I use something else instead?
For 2, my questions are
a) since I am using crud from https://github.com/FriendsOfCake/crud, is there a standard action I can use?
b) or I need to change the conditions?
What I am using:
CakePHP 3.1.1
Crud 4.2.0
Why do I need this?
I want to prevent users accidentally duplicate companies while at the same time, I cannot set it such that the name of the company is a unique field in the database.
I have created a table with fields: products and cost, using hook_scheama that takes values from a form. I want to create a field price which it will be the multiplication of fields: product and cost, and store it in the database. I also want to display the field in the form.
How can I do that? I’m not very experienced in drupal
I think you shouldn't be doing that with custom hooks. There is the module Computer Fields.
Computed Field is a very powerful field module that lets you add a custom "computed fields" to your content types. These computed fields are populated with values that you define via PHP code. You may draw on anything available to Drupal, including other fields, the current user, database tables, you name it. (Feeling the power yet? :) ) You can also choose whether to store your computed field values in the database with other content fields, or have them "calculated" on the fly during node views.
I am using the Views Pivot module (may not be relevant since I think my query is more views in general)
I want to put Subjects (Taxonomy) as row headings and Child Names (Another Taxonomy) as columns.
The data will be a Node title that where both the Subject and Child Name was selected.
The above works but only shows me the just those Subjects that have actually been used in the content type. I want to show every Subject and have a blank cell where the Subject has not been used in a node.
I want this exact same answering but I am using Views TableGroup module - but it appears it's the query itself that's the issue and not the module.
One way to go about your issue is to create the view from the perspective of the Subject - do you know how to list all your subjects out in a row in Views? That's something I'm struggling with at the moment - if you know how to do it your almost there.
You'd create your view with the Taxonomy: Subject field as the filter - then you would work in reverse so you'd pull any child name's that are linked via the content type.
I have custom object on which there is a standard field 'Name'. The field type - text (Text(80)). It does not autopopulate, and the values it can be set only through the edit page. This field is not mandatory on the project and on the edit page, but when I create a new record of this object this field is autopopulated by Id of this record. Although it is expected that the field should be left blank.
Can I fix this strange behavior with help of some options or settings? Are there any solutions?
I don't think so, it is either auto number or text in which case it'll be required, can not be left blank, salesforce autopopulates the record with the id in case you do not provide one and there is no setting to change that behavior (that i know of on current releases)
I'll recommend changing your requirements and at least populate the name of the record with something, a naming convention for the record on it's current stage would be helpful,
That way you can list all of your "ANONYMOUS" records and assign them into a queue so a business person can go and put the right info just to cite an example, a custom unique identifier which can be recognized by your system or an external application, but never blank