Drupal view field - drupal

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.

Related

Wordpress custom post type structure

i am building a wordpress website for a client. i need to build 1 template type of page with a list of fields that the client can fill in to populate the page. so lets say i build a template page called Person Template. On it i have an empty picture placeholder on the left and an empty Name Field below that. On the right i have an empty "persons phone number" and "Persons email" field.
what i need to create somehow is a system that the client can enter these 4 items into wp-admin somewhere and save that as a new Person. Then they can repeat and save another Person until they have created say 100 Person pages.
How do I do this? I tried building a Custom Post Type called Person CPT. I have built a Page called Person Template. I have built some "Person CPT" posts and put them on a page but i dont know how to create the Entry Fields page for my client to use.
You're correct that you'll need to use a custom post type. To add the fields you have two options:
Add the fields using add_meta_box(). You'll then need to save this data as post meta. Then in your single-person.php template you would retrieve the meta using get_post_meta(). It's a tad cumbersome, as you need to write the markup for the meta box, hook it into an action to add it to the admin page, and verify the content before it's saved. Here's an article that walks you through it
Alternatively get yourself the Advanced Custom Fields plugin: it makes adding additional fields very quick and easy. I use it all the time.

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 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

Newly added Drupal cck fields are created but not shown when published

I have a content type which has several fields. When I add new fields to this content type, they get added. I am able to enter data into these newly created fields. But when I publish it, the previously existing fields are shown. But the newly created fields do not appear.
I have checked the permission, cleared the cache.
Am not much aware of using view module. But there exist a view for this content type. Is that responsible for it?
Thanks in advance.
If the page where you want to see your fields is handle by Views, yep definitivly need to look into this views. There a lot of chance that the views only display fields (at the opposite of "full node" or "teaser"), and the fields it display are set in the views configuration.
Some modules will allow granular permissions per cck field.
You might check the user permissions page and see if there is a checkbox for "view {CUSTOM FIELD}" or "edit {CUSTOM FIELD}".
I found out what it is. Actually in the file node.tpl.php , there was an exception for the content type 'article' to print only the predefined fields. So, the newly created fields were not getting printed. But when I added the php code for printing these newly added fields, it worked. Thank you everyone for your time.

How do I put a custom version of node/add form in a view using customfield in drupal 6?

I'm trying to add a pre-filled 'add reply' form to a view of nodes. Reply is a content-type (reply) with certain fields that need to be prefilled based on what is in the view. This way a user can see only the selected fields from the node/add/reply.
At the moment I'm building the forms manually - copy the form from node/add, do some modifications using php & views customfield, but I would like to be able to just push default values to some fields and hide some others and then make drupal render it with all the javascript glory like date select etc.
Can this be done?
How about using Form Block to place the node add form on a page in a block below a view.
About conditional defaults... I guess javascript.

Resources