0

I have created a custom file list form field and the field is used in a repeatable subform.

The purpose of this custom form field is to display a list of files in folder based on 'name' field in main form.

The problem I've encountered is: How to get the 'name' field from the custom form field to redirect to specific folder?

The form object ($this->form) is the subform object.

How to access the main/parent form fields to get the required 'name' field value?

1
  • Welcome to JSE, please take our tour while you wait for support. Commented Jun 19, 2021 at 22:56

1 Answer 1

0

As far as i know, its simply not possible - i had to use javascript for a similar scenario (the other way around) and loaded the files by AJAX inside a modal.

the "logic" was: Get the targetfield's id that holds the filename after a subform got added, custom modal that holds target field id and its value as data attr. after selecting a file js stores the filepath in the field... It started to get complicated when added subform multiple mode.

You can download agileDownloads to have a look for the Custom form field I've created there: https://extensions.joomla.org/extension/agile-downloads-lite/

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.