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

#ajax Form API to do two things

This part of my custom form depends on ajax to conditionally show additional fields. It is working.

[help] Checking if the Min Max field in an exposed view exist.

Hey guys,

I've been having trouble accessing certain fields in an exposed filter.

I have a content type where I insert 3 prices for different types of products.
Some products will have all 3 prices added some just 2 or 1.

All prices are entered based on one currency (EURO).
However, Using twig I have to display one of the prices in $USD, lets call it price 3.

reading Json String

Hi,

I have this sample data and this is just a part of data but it is swagger which is a JSON.

a:14:{s:7:"swagger";s:3:"2.0";s:4:"info";a:6:{s:10:"x-ibm-name";s:22:"test-summary";s:5:"title";s:28:"test Summaries for test";s:7:"version";s:5:"1.0.0";s:11:"description";s:84:"Account Information, retrieve account test and statuses for the test.";s:7:"contact";a:2:

This data is extracted as string on the variable "apiSwagger"

$apiSwagger = $apiNode->api_swagger->value;

After using a delete all nodes API, ONLY the values of the author column are displayed

Using Drupal 10:

Is this way below (to delete all content for a content type) reliable (instead of using the loadMultiple method)?

\Drupal::database()->delete('node')
->condition('type', "mycontenttype")
->execute();

Update field settings' value upon form submission!

Created a custom webform product module that includes a composite field for stock settings. After submitting the form, what is the proper way to update the stock value in the backend?

How to make the first POST request in VS Studio to add an entity?

Hello,

I like to make a POST request to add an entity. I was able to do it in Postman. Now I am trying to do the same in VS Studio, but I am getting the error "The website encountered an unexpected error. Please try again later.". 

I created the route in the module's routing.yml that points to a method of the Controller for an HTTP POST request. 

In Postman, I was able to make a POST request as follows and was able to add the entity just fine.

Pages

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