Indicia-Team / drupal-8-module-iform

Drupal 8 modules for Indicia
0 stars 2 forks source link

Custom validation code directory needs moving #5

Closed JimBacon closed 3 years ago

JimBacon commented 3 years ago

When you provide custom validation code for a pre-built form, as described in the documentation, the file is searched for in the iform/client_helpers/prebuilt_forms/validation folder.

As noted higher up in the documentation

Previously, the recommendation was to place custom CSS and JS files in the path client_helpers/prebuilt_forms inside your IForm module folder. Although this still works in Drupal 7 (not Drupal 8) the result is your module folder containing custom changes which makes upgrading messy, so using the client_helpers/prebuilt_forms subfolders to hold custom code files is no longer recommended.

Therefore we need a fix to provide an alternative like <public files path>/indicia/validation

BirenRathod commented 3 years ago

@JimBacon is this separate to one we already use on all Drupal 9 which is sites/default/files/indicia/js & sites/default/files/indicia/css ?

JimBacon commented 3 years ago

Yes, separate, though very similar in principal, as you noticed. It is a place for php files which validate inputs on submission. (I.e. server-side code rather than client-side.)