Install this fork of plugin
https://github.com/PopcornPHP/currency-plugin
Go to /backend/responsiv/currency/currencies , and create new currency. There, in the bottom of modal window, there is field named 'IMAGE'. This image will be uploaded, but not attached. If click on uploaded thumbnail - you can see error:
"A widget with class name 'formRelImage' has not been bound to the controller" on line 523 of \modules\backend\classes\Controller.php
418
If this is not an error - then how do I properly attach an image in modal windows?
Please observe this video series, it is somewhat a right of passage for this level of issue.
https://youtu.be/llo6xyKx3i0?list=PLfQvk5RK_e-Zim57m_CptCXYlgFT7P_sv
Essentially your file upload widget is not bound to the controller because the form exists only to render in a modal. You should pass through a post variable to trigger the binding in the constructor.
public function __construct()
{
// ....
if (post('form_mode')) {
$this->asExtension('FormController')->create();
}
}
The above code simply creates an empty model instance for you (create mode) and boots up the form and its widgets--binding them to the controller, making them available.
Then adding <input type="hidden" name"form_mode" value="1" /> to the create modal markup.
GLHF!
Thank you very match! Everything is working
Thanks @daftspunk
Most helpful comment
Please observe this video series, it is somewhat a right of passage for this level of issue.
https://youtu.be/llo6xyKx3i0?list=PLfQvk5RK_e-Zim57m_CptCXYlgFT7P_sv
Essentially your file upload widget is not bound to the controller because the form exists only to render in a modal. You should pass through a post variable to trigger the binding in the constructor.
The above code simply creates an empty model instance for you (create mode) and boots up the form and its widgets--binding them to the controller, making them available.
Then adding
<input type="hidden" name"form_mode" value="1" />to the create modal markup.GLHF!