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

SFTP connection and file transfer in Drupal 7

Please follow the below steps in Drupal 7 to transfer file using SFTP connection:

1. Install the library: "phpseclib/phpseclib"

2. Install the module: Encrypt (encrypt)
3. Install the module: File Transfer Wrapper (file_transfer_wrapper)
Then add connection at the configuration page: admin/config/file_transfer_connections such as "fileupload".

Formstate getValue() returns empty value for huge input

I'm having a form with textarea field and print this field value in ValidateForm using $form_state->getValue('field_name'). But it returns empty value if i give huge input(80K+ characters). Same will work if i give some less input (20k chars). Is there any limits in input value?

Capturing keyup event (JavaScript) from Drupal editors (CKeditor)

I maintain the Textfield Counter module. An issue was raised that the module does not work for textareas with CKEditor enabled. I need to catch a keyup event from editors, or even just the CKEditor module, for the module to work. I haven't worked much with Drupal editors, nor CKEditor. Does anyone have any insight into how to do this?

Does diff module support nested arrays comparison?

Hi,

I want to display the output for nested arrays in the Diff compare page. Does the Diff module support nested arrays comparison?

Namespace in .install file

Is it proper to place a namespace call in your drupal .install file? I have a module and was using some standard functions such as

function setup_content() {
  <do some functions to setup sample content>
  return;
}

The purpose was to install some content and do some other setup of the module. I used this function in multiple .install files and started getting an error that it was declared multiple times.

Submit Webform with a file field from JavaScript

I am developing a Drupal site with a JavaScript (React) front-end. With the help of Webform REST module I was able to submit forms from my React App. However, I have a form which has a file upload field and I cannot use a REST api to submit the form data. My approach is to create a custom controller and POST form data with the "Content-Type": "multipart/form-data" headers and programmatically submit the Webform.

Pages

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