We have just purchased a licence for fineuploader and it works great.
However, the documentation, after basic setup is rather confusing.
We are trying to handle the validate event but cant find any information about what the event data is such as valid extension etc and how we can inform users about any errors happening in the validation phase.
Would appreciate any assistance
The validate event is documented in quite a bit of detail in the events documentation at http://docs.fineuploader.com/api/events.html#validate.
As the validation documentation says, you can use the validate event to enforce your own custom rules. You are given the name and size of the file in your callback handler. If you need access to more information (such as the actual file), you can declare a submit event callback handler instead. When submit is called, an ID is available for the file, and you can address it using any of the other API methods that require a file ID.
If you only need to validate based on file extension, use the built in validation for that. See the validation config options for more details.
You can display a message to the user however you see fit. The onError callback will be invoked on a validation error. If you are using Fine Uploader UI, the showMessage function will also be invoked with the error message.
Please have a close look at the portions of the documentation linked to above, as well as the live demo that includes validation on the home page.
Related
I want to create event to track form input in my website form. For example someone types in name section, phone sectio or email I want to see that as event in my GA4 account. But I couldn't manage to create triger and event from tag manager. Any tips guys?
I created additional variables threw tag manager. But couldn't create trigger.
GTM's best practices advice not to do so-called DOM scraping. The proper solution here would be you asking your front-end developers to push dataLayer events for which you would be listening from GTM. This way, when things change on the front-end, the developers can effortlessly move the tracking to a new form, or a new field.
In some cases, inferior tracking methods must be used, however. In this case, you would want to deploy a custom HTML, which would be a <script> tag in your DOM deploying event listeners on form field interactions. The callbacks of the listeners would deploy dataLayer events with payloads containing whatever else you need to know about the interactions.
After you deploy the listeners and confirm that the callbacks work as you want, you make custom event triggers, indicating your event names from the dataLayer pushes. You can make dataLayer Variables to declare used datapoints in the DL events and use the new variables in your tags.
I want to push some POST data to my plugin in Joomla.
But I don't know how to receive the data in my plugin.
Do I have to POST them to some kind of URL as
index.php?option=task=pluginnotification&no_html=1 ?
Any help?
Only components are supposed to handle URLs directly. There is exactly one component per page which is responsible for handling incoming data. So in general, you can't send data to a plugin.
But of course, there are workarounds. Given the fact that the component which is addressed by the POST target URL ignores your data, you can access that data in your plugin code. If you want to handle the data earlier, create an additional system plugin which runs before the rendering process.
The best solution is definitely creating a dedicated component which handles the incoming data and responds in the right way.
first way : if you want , you can send data to AJAX plugins.
for this way read ajax component in joomla:
https://docs.joomla.org/Using_Joomla_Ajax_Interface
secend way : or you can create EVENT for your Component and call this event befor or after save data
in this case you access form data before or after save and you can manipulate data
I would like to open a Dialog or Modal if I get a status 401 in AUTH_ERROR. What is the best way to implement this.
Thanks!
You'll have to take the custom app route:
Follow the documentation to bootstrap your custom app.
Add a saga which should take the latest (takeLatest in redux-saga) FETCH_ERROR action. This action has an error property. The saga should then dispatch (put in redux-saga) a custom action which will be used by a reducer you'll add.
This reducer should contain the data required for the modal: at least a boolean determining whether to show it or not.
Finally, update your custom app by adding it a custom redux connected component which will check if it has to show your modal.
Is there a way to create a page in ClickFunnels(https://www.clickfunnels.com/) website and when I submit that page, I need to store the form details in my rails app(into a particular table). Which means I want to display my database in the clickfunnels integrations list. I googled hours but couldn't get much information on this.
can anyone suggest me if you have done this. A reference link also much appreciated.
We couldn't find any way to do this inside clickfunnels itself, if there is a easy way to add custom systems to their integrations I too look forward to seeing those answers. Until then, here's what we did: We just put our custom form on their page and used ajax to send it back out the end point in our system it needed to hand that data too.
Then, since we also needed to submit the same info to click funnels, we build a fake CF form(I think we actually put one on the page, but used CSS to hide it, then filled it out dynamically from our custom form), and call submit on that form, sending the user through the normal click funnels submission process and sending them to the next page in the funnel.
I started integrating SecureSocial in my play/scala app, but I don't really like all the redirects it does between it's different views.
example - try to login from it's default login page and if you put in a wrong pass you will be redirected to a different page (url) but with the same login form. the only thing that is different is that there is an error message...
I want a simple login form (user/password provider) at the corner of my main page that submits it's data using ajax, this data is validated on the server and a response is made to either display error message/s or change the window.location.
Next to this form I will put a link to go to a more advanced login page that adds the option to use other providers like fb/twitter etc..
But from that page I also want to use ajax to submit the details and get the response.
I tried to browse into the SecureSocial source but got a little lost in there.
Can any one give me an idea how to use SecureSocial's but without using any of it's views?
NOTE: I'm not interested in customizing their views, It's not just a CSS/design issue, I want to handle the login details Ajaxly and not with normal form submission followed by redirects...
After some more rummaging around in SecureSocial code I got a better understanding of how it operates.
You can use any of the providers you listed in the play.plugins file seperatly to authenthicate the user's info from your own login/auth code. just make sure you send the right parameters that the provider needs.
I liked the way SecureSocial's ProviderController class dynamically decided what provider to use, based on a parameter. But I didn't like the responses it made - redirect.. I wanted to respond to an ajax request with some data and let the client side js handle it.
This is my solution:
pretty much copy all of ProviderController code to my own Auth.scala file (a Controller).
Changed the redirects related to "case ex, case _", kept the redirect on successful auth as it adds the SecureSocial session key related to the user.
Removed all the SecureSocial related routes from my routes file.
Put an additional hidden field with the logintype (userpass/google/fb/etc...) and configured my login ajax post to sent this along with the post to my Auth controller.
If you need more info comment here and I'll edit the answer.