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

Custom module/block help with sort

I have a custom module (that was designed by my predecessors) and I need to sort it opposite of the way it is doing now.

The module finds articles with a certain tag and sorts them from Oldest to Newest (top to bottom). I need it to go the other way.

I think this is the code that it's built on.

Drupal 8 : How can you alter the display of Flag confirmation dialog messages?

Hi

i'm using Flag in Drupal 8 and would like to print values's field of flagged content into the modal confirmation before to confirm the flag.

Is there any way to do this ???

How to make js work corrently at unlimited option on a custom field

Hello, I'm new to Drupal.

I have made a custom module for a text field. At first it shows a text like "Show more", after the user click the text it changes to a Telephone Number with Jquery and the telephone becomes a link. Then, if the user click the Telephone number it opens the phone app to the smartphone. Furthermore, I count how many times the text is clicked by the users. This is where the trouble begins, if I have only one value on the settings all this works fine but if i make it unlimited the js don't work. Can anyone help me?

Login user by function call without password

Hello,

I'm currently developing an API for syncing user Data with a third Party System.

Apart from Syncing the User data, the user should be able to login to our Drupal System by clicking a button in the third Party application. Since we cannot sync the user passwords (they are only stored hashed), the Authentication is done by the third Party application. The application the authenticates itself to the Drupal System by hashing the request with a Security token.

Programmatically set exposed input for a View Block

So I have a Drupal 8.5.5 with a View with a single Block display. This block has an exposed input set. I recently learned that the exposed form will not appear unless you configure the Block to use AJAX, which doesn't suit my purposes. Therefore I'd like a way to set the Exposed Input manually via a hook (or some other means).

I have tried populating the exposed input via several hooks, but none of them are influencing the results of the block, they just appear to be ignoring it. Enabling AJAX on the Block does work, but like I say this does not suit my purposes.

Drupal form errors in json format

Hi Team, 

Is there any way we can get drupal form errors (all) in json format. 

For eg: I created a form with fields name(required=>TRUE), age(required=>TRUE), city , submit . 

Now if any user submit the form by disabling HTML required field false, they should receive a json which should have some message like

{
    "name": "name field required.",
    "age" : "age field required"
 }

Any ideas??

I have tried using $errors = $form_state->getErrors(); in validateForm function but than I'm not able to change 

Pages

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