This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Define a custom content type with fields in a module

I'm new to Drupal and I'm trying to understand the best approach for this. I need to have a few custom content types, each of which needs to have a few basic fields.

Publish button on view grid?

I have a grid that shows list of attachments from comment. The attachments are not published sutomatically after they are uploaded, rather i collect them in a view and display as a grid in a page. Is there a way to have a check box or button to publish attachments in a grid? Is it possible? 

My view grid has following columns right now:

Attachment_name, Date_attached,Author,Published(y/n)

Adding a button to the view tab (display) of the content.

Hi, I am trying to add a button to the view tab. (The tab where the content's fields info is displayed)

When I push the button, I want it to check some of my fields' data if they are submitted.

Then, if they are not, I will get a pop-up screen.

Filter Exposed in views

In one view I have chosen an entity reference field as a filter.
The filter works only by typing the node number.
To allow the user to choose the Registry, I modified the field transforming it into an autocomplete text field and wrote a query to filter the data but it doesn't work and I didn't understand why.
The name of the filter field is
field_request_target_id

Changing a field's settings from unlimited to limited - complains of entities with 3 or more values but not true

Hello, like my subject states I was trying to set a field with unlimited number of values down to a limit of 2. I get:

1 error has been found: Limit

There is data for this field in the database. The field settings can no longer be changed.

and

"There are 11 entities with 3 or more values in this field" 

I was able to find two entities that I could remove the extra field items but it still says 11. I've gone through every single one and can't find any with more than 2 items.

Number field value is not pulled in compund field

This is my attempt to create a compund field with number field. I have created a compound field with fields(two text fields, two link fields) and finally added one number field. 

The problem is that, all the fields are stored properly in the database, but the the number field is not pulled when in re-edit node. But all other fields are pulled. 

The widget code

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions