Application approval form assistance

Trister

New Member
I have a User Application form that works fine, except the validations fail when I refresh the page, I have to refresh it twice to clear the errors.

The admin then reviews the application and chooses a STATUS (a field) of Accepted/Denied/MoreInfo.

1) Is there a way to send out an email based on the STATUS selection?
An email does get sent, with "You've been {STATUS}". But you can see [MoreInfo] would be a problem and it would be nice to customize the email more such as "Congratulation" for those accepted or "We appologize" for denied. But would also like to inform the user what more information we request when selecting "MoreInfo".

I believe the only way to do this is to setup the email template to test the variables and output the appropriate message. And in terms of the MoreInfo, well, add a textarea in the form for the admin to type and include that in the email via the php template, if that's even possible and if I'm correct in how this template is used. Do I have this correct or is there another better way?

2) If more information is requested, the user needs to come back to the application and make changes. Showing the same list the admins see won't do. So I created another list, which automatically creates another form, group, and elements. I bascially needed to duplicate everything just so the user has a different view of the list and that only his application shows up. If this is how it needs to be done, there's going to be a whole lot of elements since I'm creating 3 other forms requiring admin approval. Is there another way?
 
1) You can include placeholders in HTML and article templates and you can use the "Condition" to determin if the email should be sent.

2) Use prefilters on your list,
add 2 prefilters:

your-user-element(raw) EQUALS {$my->id}, Type Text, Apply to Public (Users can see only own records)
OR
id >= 0, Type noquotes, Apply to special, admin ... (so that admins can see all records)
 
I've got the list to show only the user's application and all applications for admins. Thanks!

The emailing part still needs working on.

These emails are to be sent dependent on STATUS. (1 for Pending, usually requiring more information, 1 on Approved, and 1 on Denied)

In an email condition I have:
PHP:
return JRequest::getVar('member_application___status') == "Pending";

But nothing gets sent. Only removing the condition does the email sends which, means something is wrong with the code or it's not returning TRUE.

3 other things: When refreshing the form, it gives me a validation error. I have to refresh it twice to clear it, is this expected?

I have a 'popup' message that is showing up as a page instead of a popup.

What's the difference between 'Email' and 'Send Email' under the User Plug-in?
 
For debugging include a var_dump to see what you get
Code:
[COLOR=#000000][COLOR=#007700]$status=[/COLOR][/COLOR][COLOR=#000000][COLOR=#007700][/COLOR][COLOR=#0000BB]JRequest[/COLOR][COLOR=#007700]::[/COLOR][COLOR=#0000BB]getVar[/COLOR][COLOR=#007700]([/COLOR][COLOR=#DD0000]'member_application___status'[/COLOR][COLOR=#007700]);
var_dump($status);exit;
[/COLOR][/COLOR][COLOR=#000000][COLOR=#007700]return [/COLOR][COLOR=#0000BB]$status[/COLOR][COLOR=#007700] == [/COLOR][COLOR=#DD0000]"Pending"[/COLOR][COLOR=#007700];[/COLOR][/COLOR]
 
This is what it spat out

Code:
array(1) {
  [0]=>
  string(7) "Pending"
}

Instead of checking for "Pending" should I be checking for the array or through the array?

Something like in_array("Pending", $status)

or $status[0] = "Pending";

EDIT: When I try using $status[0] and save, it changes to $status[1]

EDIT2: in_array("Pending", $status) worked.
 
Thanks for your help I'm done with the application and it works sort of how I'd like it.

Just a few things remaining

1) Validation fails when refreshing the form. I have to refresh it twice for the errors to clear, is this expected?

2) I have a popup redirect that doesn't popup, it's just another page.

3) What's the difference between Email and Sent Email under the User Plugin?

4) How would I get the form to error if they already submitted an application?
 
EDIT: When I try using $status[0] and save, it changes to $status[1]
This is an old issue, I thought it was solved. So what exact fabrik version are you running, did you update from GitHub?
A workaround is to put spaces $status[ 0 ].

4) you can add an "isunique" validation to your user element
3) no idea what you mean, which plugin (element, form...)?
2) I never used this, but the text says "content redirect". So is your form displayed in an article? or is it just called via a menu item?

1) I can't see this behaviour
 
No, I have not updated from GitHub. Joomla says it's 3.0.5.2 but when I downloaded it, your site said I was downloading 3.0.6.

3) the element user plug-in

2) The form is called from a menu link

1) Here's my site http://dev.bffaceoff.com/member-app-form
If you go here and just click the birthday field but don't enter anything - it'll fail. Then click the "Members App Form" link on the left, all fields now shows errors when refreshed.
 
Install download zip or update to the recent version (maybe you'll have to "Refresh cache" in ExtensionManager/Manage and "Purge Cache" in ExtensionManager/Update)

What are your menu item "Options" settings?
What are your form "Save partially completed multi-page forms" settings?

The "User data" dropdown is just showing the Joomla user "elements", so I assume "Send mail" is the "Receive System emails" (I never tried).
 
I've updated to 3.0.6.2. These errors/bugs still exist.

Validation Errors
If you click on a required field and fail the vaildation, without submitting, you refresh the page, all required field validations shows failed. You have to then refresh the page again to clear the marked errors.

Popup
The popup feature still shows as a page. The Menu Options are default, no Row Id, key name, no random records, and default form. The "Save partially..." is set to No. Also I can't find the option since I updated it.

Update Problem
A new problem since updating Fabrik. Nothing happens when I click "Add" to add a plugin. For Lists, clicking Add only shows a Delete button. For Forms and Elements nothing happens. For Elements, nothing happens when clicking add for Vaildations and all my vaildations do not show, but the form still works as it should. I can add JavaScript.
 
Latest version is 3.0.6.3.
After updating you'll have to log out and clear all browser cache to make your browser use the new JS files.

Popup: you mean the redirect popup option? As far as I know this is only if you are displaying the form in an article via content plugin.
 
All the problems went away and I understand about the popup. so thank you so much for taking your time to help me!


A questions: Does the article insert "{fabrik blah blah}" only work with the default Joomla article system? I tried using it with K2 and received a page error.
 
We are in need of some funding.
More details.

Thank you.
Back
Top