create field in view other than database fiels - drupal

i want to add one field in view from my module.Is there any way to add a field which is not in database to the drupal view?

Can you add a computed field (http://drupal.org/project/computed_field) to your nodes? This doesn't have to be stored in the database and it could use your module, or you could enter php code directly.

Related

display custom tables field value in content-type form in drupal

In drupal i have created custom table where am storing some information.
Now I want to show some data from that table to my particular content type form.
so how to do that in drupal?
for more detail please check here https://drupal.stackexchange.com/questions/114917/how-do-i-display-custom-tables-field-value-in-content-type-form
Using HOOK_FORM_ALTER you can set required value as a field default value.
Cheers!!!

Drupal 7 webform/entityforms with node reference

I have a form on a node, that displays 2 fields that are entity reference fields from the current node page. It shows the correct info on the label of the fields, but as soon as you save the form, it saves the nodes title and not the correct info.
See screenshot at https://www.dropbox.com/s/rwj1lu1d34zgb53/ScreenshotEntityform.jpg
I don't know PHP or how to mod/write a Drupal module, I just need some guidance as to if this is possible and how to do it, so any help would be really really great, thanks.
There is a setting to edit how an entity reference field is displayed.
If you go to Structure > Content Types > Your Content Type > Manage Display then you will see a select box to control the format of each field.
The entity reference field will let you choose between either label, entity ID or rendered entity. It sounds like at the moment it is set to label so is showing the node title. If you set it to show the rendered entity then it will show all fields that belong to the referenced entity.
The easiest way to hide fields you don't want displayed would be to install the Field Permissions module. This will give you a setting for each field that allows you to choose who can see it. If you don't want to use the Field Permissions module you could create a custom template but it sounds like your trying to avoid that...

Drupal view field

In Drupal, I would like to display some user related nodes on their "My Account" page. I would like to do so by creating a View that i would add as a field on the user entity (through admin/config/people/accounts/display). I could use Computed Field in order to load and render the view but that is not very convenient as it requires me to write PHP code.
In short, is there a module that allows to add dummy fields containing a view in the "manage display" sections of entities?
Thanks for your help.
Yes, Viewfield. This allows you to reference a view and renders it.

Drupal 6.20, fields missing when viewing a node appear when editing

I have a node that contains 6 fields. When the user views the node, the only fields that appear are those for which the user has already entered data. When the user edits the node, all the fields are visible. I have inspected the HTML to confirm that the missing fields are not being hidden by CSS. How do I make all the fields visible when the user views the node?
If the field is empty, then drupal won't display it.
You can create a views with Views Module http://drupal.org/project/views and display all fields with a default value.
Contemplate is also a good solution to create easily template for your node : http://drupal.org/project/contemplate

Drupal: How to update display fields after changing the database?

I added a new column "approval" into the table 'files'. When i go to views and wanted to add the approval field, it's not there.
What can i do to let it appear?
Create little module with hooks of views, that describe your field

Resources