hummingbird icon indicating copy to clipboard operation
hummingbird copied to clipboard

[Idea] Add the <textarea> element among the available types for the FromField class

Open Codencode opened this issue 7 months ago • 2 comments

Questions Answers
Description? Added the textarea type
Type? new feature
BC breaks? no
Deprecations? no
Fixed ticket? Fixes https://github.com/PrestaShop/PrestaShop/discussions/38591
Sponsor company @Codencode
How to test? Attached test module that adds the new field to the account creation form.

Codencode avatar May 05 '25 07:05 Codencode

Installing the test module adds the new field to the account registration form, as shown in the attached screenshot. Screenshot 2025-05-05 at 09-27-26 Registration

Test module: idea_38591.zip

Codencode avatar May 05 '25 07:05 Codencode

cc @tblivet

kpodemski avatar May 13 '25 11:05 kpodemski

Hello @SiraDIOP,

No, it’s not normal. There could be 2 issues:

  1. You didn’t apply the PR correctly.
  2. You didn’t recompile the templates.

Case 1

Check that the new instructions found here are present in the file themes/hummingbird/templates/_partials/form-fields.tpl: https://github.com/PrestaShop/hummingbird/pull/698/files

Case 2 In Admin > Advanced Parameters > Performance, make sure that Template compilation is not set to Never recompile template files. If it is, you need to clear the cache (use the Clear cache button on the same page).

Codencode avatar May 20 '25 15:05 Codencode

Hello @SiraDIOP, I'm not very experienced with Linux shell, but I believe there might be an issue with this line:

git prc origin 698 dev

However, to make sure the PR was properly imported, you just need to verify that in the file themes/hummingbird/templates/_partials/form-fields.tpl you can find the instruction:

{elseif $field.type === 'textarea'}

at line 158.

Codencode avatar May 22 '25 13:05 Codencode

Hello @Codencode,

Thanks for the PR, I hadn't installed the PR correctly, but it's fine now.

Everything is ok for me :) Capture d’écran 2025-06-01 à 00 14 20

Thanks

SiraDIOP avatar Jun 02 '25 07:06 SiraDIOP