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

D8 hook form submission status

Hi all

I have a module in D7 that I'm trying to change for D8.
It uses a hook form_alter to fo various things after a particular form is submitted.

I'm struggling to find how I get the submission status in the hook.
So has the form been submitted?

In D7 I used if(isset($form_state['input']['submitted']))

What is the syntax in a hook to check if a form has been submitted? I can't find an example anywhere.

"403 Forbidden error" posting file via Rest API

Hi,

I'm trying to POST a simple file using HTTPClient (Rest API).
I have installed RestUi and configure everyting correctly (I can GET and POST any content type).

My problem is posting a FILE...
I have added FILE (with POST method) in RestUI.

When I launch my POST request, I get "403 forbidden" : 
"Client error: `POST http://XXX/entity/file?_format=hal_json` resulted in a `403 Forbidden` response: {"message":""}"

Page does not load slides

Hello I hope you can help me my page does not load the new slides that I add and I do not know what it may be, I hope you can help me then I add screenshots.

Drupal 7.6

Creation of a new custom form

I have created a custom form and it works.
I need to create another module by clicking on install this error returns me and I don't know what to do to solve the problem. I tried to delete and reinstall it but nothing to do

ReflectionException: Class \Drupal\hello\HelloController does not exist in ReflectionMethod->__construct() (line 136 of core\lib\Drupal\Core\Entity\EntityResolverManager.php).

External script using Drupal database and user module

Hi all,

I'm working on an external script using user database and rights management from Drupal 7. It was working fine till some update on the server (unfortunately I'm not able to get exact info about updates from the provider, or maybe it is casused by some change in Drupal I dont remeber). 

At the beginning of the srcipt I'm loading drupal core using this:

How do I add column to existing table on module installation?

I am trying to add a new column to a table and I added the column using hook_update_N() in the module.install file:

Pages

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