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

Hide "Choose File" Button for only one form

I have a form with the id of node_contact_edit_form. On this form it has an image field that has the default Drupal choose file button. I would like to disable/hide the button and only allow the users to pick the images from a folder I have on the server. I have tried hooks like form_node_contact_edit_form_alter but can't figure out how to target the button only. Anyone have some ideas?

Display orphaned references of deleted user

Is there a way to display the name of deleted users, when they are referenced in a node, provided I store the name of the user id somewhere? 

How to create an archive containing files with the Drupal interface ?

My question will be very complicated ;-)

 

When you reserve a domain name with a host, it offers a free space of 10 MB to publish a web page (this type of offer does not support PHP).

I created a small 8MB website with HTML, CSS and JS (it's also a PWA). It is really very simple. Here it is :

https://github.com/S1BIOSE/E-business-Card

I want to create in Drupal 8, a small website generator for my clients. The little website I created should serve as a model.

Access denied on a path

I have the following in formtable.routing.yml for a custom module named "Formtable":

formtable.form:
  path: /formtable
  defaults:
    _title: 'FormTable demonstrator'
    _form: \Drupal\formtable\Form\FormtableForm
  requirements:
    _access: 'true'

When visiting the path /formtable on the site I get "Access denied You are not authorized to access this page."

read-only select field

I need fields with widget select to make some of them read-only.
I tried both with
$form['field_localita_missione']['widget']['#disabled'] = TRUE;
that with
$form['field_localita_missione']['#attributes']['readonly'] = TRUE;
The former works but does not save the data, while the latter does not work

I wrote a module I want to contribute - what's the next step?

I'm a site webmaster who knows just enough Drupal to be able to (sometimes) add a new feature that I really need to be able to become more efficient at my job. I wound up creating a couple new global fields for Drupal 7 views, and anticipate creating more. These fields might be useful to others, so I'd like to contribute them to the Drupal community; then again, if the way I created them doesn't fit well with Drupal, then they might not be a good fit for contribution (yet).

Pages

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