Linked Questions

11
votes
1answer
5k views

Why are field widgets not form elements?

Form elements are often separate from field widgets, yet they implement very similar functionality. Sometimes, their functionality also creep across the two apis, such as in this question: Is ...
5
votes
1answer
436 views

Creating a temporary content type on the fly?

I want to create a temporary content type, and a node of that type, in code. It preferably should not live past page load. Can I do that? For the reason to this very strange request, please see Using ...
3
votes
3answers
2k views

How to add an image field to a programmatically created form?

Basically I want to create a block with my module which's edit page has a few content fields and two image upload fields. When visiting the node where this block is rendered, I want to render the ...
2
votes
2answers
2k views

Custom form: How to implement a module's field widget

In my custom form I have a file upload, which follows the array structure of file_element_info() in file.module in core. This is consistent with examples in examples module and date module has ...
2
votes
0answers
95 views

Render drupal field widget in custom page [duplicate]

Possible Duplicate: Is displaying a working Field Widget Form on its own possible? I have my module called mymodule. In mymodule.module I have: function mymodule_menu() { $items['mymodule/...
1
vote
1answer
1k views

field_widget_form call as a custom form

I want to call my custom field_widget_form with the use of drupal_get_form() Is it possible to do that? simple requirement .. I want to build a form where user enter the field value and that value ...
1
vote
1answer
266 views

How to display an entity property 'type' with form api 'type' for display in a form and then setting with the submitted value?

Is there is process/ function that maps data types that you can use in entities (specifically custom entities using the Entity API) to form #type options? This is to dynamically add a field to a form ...
1
vote
0answers
25 views

Address field form in external module [duplicate]

I need to create a custom form and in it there is an address but I can't figure how to use the address field form. There is a way to use the address structure defined in the Address field module?
1
vote
0answers
37 views

How can I include a node reference field in my form? [duplicate]

My module implements hook_menu() in order to define a settings page: function MYMODULE_menu() { $items = array( 'admin/config/system/mymodule' => array( 'title' => '...
0
votes
3answers
699 views

Programmatically a create content form

I want to implement the create content form programmatically. In hook_menu() I have the following code. $items['create/content/video'] = array( 'title' => 'Create Video', 'page callback' => ...
0
votes
1answer
46 views

How make a standalone field with no Entity or Bundle?

I want to add a custom configuration form to my module; I don't know if making a custom schema is better or if I should make a standalone field and use its different field APIs to deal with the value. ...
0
votes
1answer
731 views

How to implement a multiple (AJAX) field collection with the FAPI

Background: I have a field colleciton containing two fields. This field collection is attached to a profile entity and its number set to unlimited. I am currently retrieving this field from the ...
0
votes
1answer
999 views

how to add field_image widget (imagefield crop) to a custom form api [duplicate]

How can i add to my custom form api in my custom module the default widget from field_image? I am using imagefield_crop module widget and it works in node/add form, but i cannot replicate it in my ...
0
votes
0answers
22 views

Add Brightcove field through form in custom module [duplicate]

I'm using Brightcove Video Connect 7.x-6.0-beta2 module and I want to add field in my custom module. I was tried with brightcove, brightcove_video and brightcove_field types and it is not working. ...
0
votes
2answers
887 views

Add cropping option to an image form

I've the next form. $form['imagen'] = array( '#title' => t('Image'), '#type' => 'managed_file', '#upload_validators' => array('file_validate_extensions' => array('...

15 30 50 per page