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

drupalGet() returns 200 on gibberish URL on test

Hi to all,
I provided a patch for the webform module here (version 7.x-4.22, I am working with Drupal 7.69), and am trying to provide a test with it.

Html5 Attribute on custom field <input>

I'm developing a custom module with an image field.

Where can I set the following HTML attribute to my custom field?

<input type=file
       accept="image/*"
       capture=environment>

I have created the image field and i'm able to process some OCR with an external library uploading the image but I need to use webcam instead and I can't find the way to set the "capture=enviroment" tag to my input form in the field widget file.

Thank you

External QR Reading Class

Hi,

I'm devolping a Drupal 8 module for employee check-in / check-out time based on QR code reading / decode with an external php library.

I've installed khanamiryan/qrcode-detector-decoder with composer.

Now I need to call the QrReader class inside MyModuleFieldDecoderWidget.php but I got allways an error message like this:

Error: Class 'Drupal\FieldQrDecoder\Plugin\Field\FieldWidget\QrReader' not found.

I've tried with

use Khanamiryan;

and also

Changes in a link Entity Print

<a href="/print/pdf/block_content/6" class="print__link print__link--pdf">View PDF</a>

How to change "View PDF" in this link, which is generated by Module Entity Print, for my own words (I would like to write there another words)?

Save data for logged in users

Hi,

I have been asked to work on website personalization. Basically I have to save the selections that the logged in user made in the website, so that when they log in again they dont have to make the same selections again. I have to all this programmatically.

Could you please help me how should I go about it? Any resources would help.

Thanks,

make dynamic block appear on page region

I have a custom module that builds a custom menu depending on an attribute of the node for a basic page. If $nid = 10, then a custom-menu-10 needs to appear in a region for that page. If $nid = 11, then a custom-menu-11 will appear in that same region. In D7, we just threw the custom menu into a menu_tree_all_data and used $variables['my_custom_menu'] to place the html in page.tpl.php.

To learn more in the new D8 theme API, I've created a custom block in mymodule which has the code I need to determine the node-id() and instantiate the custom menu.

Pages

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