• Fabrik4.5.1 for Joomla5.2.4

    Fabrik4.5.1 is out. This update is needed for J!5.2.4

    See Announcements

Form pop-up on Save.

jo-ka

Member
Hello.

I would like to have a Form Popup, asking the user which e-mail(s) address(es) to send to.

This popup should display, based on an Yes/No element on the form, where the user would decide if we wants to send the e-mail or not.

Then, if selected Yes, the Popup would pop, with a list of emails (associated to the customer, for example), and the user can decide with a select box, who he wants to send the e-mail to (can be multiple).

Is there a way to accomplish this on a Form on save?

Thanks in advance.
 
Not easily as I know of.

You could just redirect the user to another form which has the element for selecting e-mail addresses and save button called "Send e-mail" and Cancel button for skipping sending.

Or just have the e-mail element on the same form and if needed, hide it initially on form load and show if yes/no element's value is "Yes".

From the UX point of view, I see no benefit of popup window.
 
Not easily as I know of.

You could just redirect the user to another form which has the element for selecting e-mail addresses and save button called "Send e-mail" and Cancel button for skipping sending.

Or just have the e-mail element on the same form and if needed, hide it initially on form load and show if yes/no element's value is "Yes".

From the UX point of view, I see no benefit of popup window.

OK @juuser , the second option seems a good solution. But, How woult you populate the field with the email adresses available (from a query), and how would you select those you want/need, to send with the mail plugin?

Something like this:

upload_2023-9-5_11-8-35.png
 
Do you have the e-mail addresses in a separate table? If yes, you can use databasejoin element rendered as Checkbox or Multi-select dropdown. For the multiselect dropdown make sure "Enhanced dropdown" is enabled, so the e-mail searching works in the field in case there are many e-mails.

And then in e-mail plugin just adding you e-mail element as placeholder in the "To" field should work (didn't test).
 
OK, perfect.
I'm trying to populate the databasejoin element, with a list connected to a database view.

It works with dropdown option, but not with Checkbox or MultiSelect.

The list connected to the view is like this:

upload_2023-9-5_15-42-26.png

And I have the element like this, which results on a populated list:

upload_2023-9-5_15-47-38.png upload_2023-9-5_15-46-19.png

But, If I change the Render to CheckBox or MultiSelect (even with the "Enhanced Dropdown" option active), I get this error:

upload_2023-9-5_15-54-39.png

I'm missing something here...
 
Hard to say. At least you have a non-standard setup in your ztmk_contacts_view table with a non-standard primary key field name and auto-increment set to No. But I think this is a label, so I can't see what is your actual primary key field name in database (id or something else).

When you set databasejoin element to render and Multi-select dropdown or Checkbox, new database table called something like "your-maintable-name_repeat_dbjoinelement-name" is created. And this table has parent_id element which has relation to your main table id element. So might be that the non-standard name of your id element may cause this, but not sure without seeing the actual set-up.
 
Hard to say. At least you have a non-standard setup in your ztmk_contacts_view table with a non-standard primary key field name and auto-increment set to No. But I think this is a label, so I can't see what is your actual primary key field name in database (id or something else).

When you set databasejoin element to render and Multi-select dropdown or Checkbox, new database table called something like "your-maintable-name_repeat_dbjoinelement-name" is created. And this table has parent_id element which has relation to your main table id element. So might be that the non-standard name of your id element may cause this, but not sure without seeing the actual set-up.

OK.

On my view, I've created an Id field (auto_increment), and changed the Fabrik List setup:

upload_2023-9-5_17-12-59.png

I can render the E-mail addresses as dropdown and radiobutton, but not as Checkbox or MultiSelect List...

Not sure what's happening.
 
Is the table where you take the e-mail addresses a MySql view instead of a "regular" table? I have never had any issues with multiselect databasejoin, so it must be something odd in your set-up.
 
Is the table where you take the e-mail addresses a MySql view instead of a "regular" table? I have never had any issues with multiselect databasejoin, so it must be something odd in your set-up.
Yes, it is.
Do you this it might be related to it?
 
I don't have a test case now, but very likely it is related. Can't you pull the e-mail addresses directly from the "regular" table which is a source for the view?
 
Back
Top