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

Custom Webform Setting Using Authored Elements

I am attempting to add, to a webform, a custom setting within in the settings tab (either a third party setting or one in a custom block) that will be a drop down list of all the elements listed in the build tab. The intent is, based on the author's selection, that the selected element will be the one whose information is labeled as the main piece of information for our API.

(I had images of the "Settigns" page and the "Build" page but can't figure out how to add them)

The problem I'm having is three-fold:

Form update with table field

Hi, I have received a lot of help on custom forms but I am still missing something and I need an explanation
In the buildForm function I insert the fields I need, in this case a button called crea and a table field called table_dispo
The table_dispofield I fill it with the result of a select
Pressing the button crea launch a new query and the table_dispo field should be updated with the new results.
I inserted a wrapper inside the button and inserted the iD inside the table field and it should update the table field but it doesn't.

Submitted form data doesn't match in the submit handler

I have a form with with a referrer field

    $referrer = $_SERVER['HTTP_REFERER'];
    $form['my_referrer'] = [
      '#type' => 'hidden',
      '#value' => $referrer,
    ];

I am submitting the form using ajax.

On ajax handler when I am checking the content of the field using

SMS plugin - Need help testing

Hi. I have an SMS plugin which I need to test, but I can't get it to work with any version of Drupal. This is inherited code which isn't going to ultimately be used with Drupal, but I want to test what the prev developer was doing, so I can move forward with the project. I realize this is an unusual topic, but any assistance is greatly appreciated. This is the complete code for the single .php file, which I assume will present a simple page to interact w/ the SMS API for Twilio. 

Linking to nodes by their alias or their H1

I desire that if I wrap a node's text in WYSIWYG editor with 4 brackets ([[TEXT]]) this text will be backendly parsed as a link to a node with an alias identical to that text, or, with an H1 identical to that text.

What should be simpler, to instruct the system to search and link for a URL with an identical node alias matching the text or to instruct the system to search and link for a node with an H1 matching the text?

Get price attribute

Hi guys i was looking how to get the price of the products.

Im working in a mudule that show the price of the product page in a block.

In commerce documentaton i get this information about how to get product attributes so i try to use this:

$price_attribute = \Drupal\commerce_product\Entity\ProductAttribute::load('price');

And after i try this:

$variation_type = \Drupal\commerce_product\Entity\ProductVariationType::load('price');

In both case i get a null value.

Pages

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