profile picture upload laravel & foundation framework - ajax

I have a registration form completed and would like to add a profile picture upload. Once the user clicks the browse, he can select the photo. Then he clicks ok/apply/ok and then the photo is reflected in the thumbnail area without page refreshing.
Once the user is happy with all fields input he can submit the form and with it the photo of course.
Anything that does this exists out there already? If not, please provide guidance on how to establish this feature.
Thanks,

I'm not aware of a ready made solution for this but there probably is something :-)
However, with Laravel this is beautifully simple. You've tagged your question ajax but I'll answer this assuming you're going to use an old fashioned server round trip (i.e a form submit).
1) In your template, add a file element to the form. http://laravel.com/docs/html#file-input
2) Add some javascript to the page that detects when a file is selected and shows the preview. Extensive tutorial here: http://www.html5rocks.com/en/tutorials/file/dndfiles/
3) In your controller, handle the file using the Input facade. http://laravel.com/docs/requests#files

Related

Create a Link To An External Page On Order Confirmation Page in Prestashop

I'm very naive. I am not able to create an external hyperlink on the order confirmation page. (lets say http://google.com)
I've modified the bank transfer module to create a manual payment method, but I am not able to add a simple link on the confirmation page. The screenshot depicts it well.
Also attaching the screenshot of the backend where I input the text. I've tried editing the tpl files, but it doesn't change the actual code on the browser. I have even tried disabling html filter and typing href on the text box itself, again the code just disappears in the browser.
The images will make things very clear.
Thanks.
Link
Backend
The solution is simple, like ébewè said, go to advanced settings > Performances, and clear cache or select no from the drop-down menu next to cache.
Then you can just use high school grade html commands in tpl file to wrap the requisite text inside the code. It works!
Thanks ébewè!

ClickFunnels integration with rails2 app

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.

Session in MVC 3 for storing text in a textbox

I am new to programming, especially to MVC. I have designed a blog in MVC 3 ASP.NET for a client. The blog also have user account for admin for content management.
Once logged in, Admin can create new post. Sometimes the post can be long text. Therefore, I want to create a session to temporarily save the content within the text box as the user types it in automatically. Once the user click the submit button, the sessions ends and the text will be permanently saved.
This allows the users to leave the post half way through, come back and carry on from where they left. Also, if the browser close accidently, the user does not loose the text already typed in.
I have been trying find tutorial on this, but was unable to find a useful tutorial so far.
Any help, or point to useful tutorial would be greatly appreciated.
Thanks
It sounds like you need some sort of autosave feature. One option is the Sisyphus.js jQuery Autosave plugin that saves the form state in LocalStorage. No changes to your server side ocde is needed, so it should work for any existing ASP.NET MVC application.
https://github.com/simsalabim/sisyphus

Google Docs spreadsheet form / permissions

I have a Google Doc spreadsheet, which I created a native Form for. I copied the form code, and integrated it into my own page here.
This form was working until I gave the website owner permission to view the spreadsheet.
Since then, when we hit submit, it takes us to the native form page, and does not insert form data into the spreadsheet. (You're welcome to test the form.)
Should providing viewing permissions to the spreadsheet break my own version of the form?
Did you set permissions via docs.google.com? If so then no it should not have changed anything. I got all the way through the form to "Attending
Your response has been recorded." Is this what you are getting as well or do you have a backend error?
If it is not a backend error and I was able to get somewhere you couldt I would suggest clearing your browser chache and possibly resetting your router as sometimes they hold a cache of older versions of a website.
Did the current form of yours manage to work this before? I mean. It is shown that in the native form the questions are text boxes. While in your GUI form, it had radio buttons and check boxes, since you are calling the native post back url?

Do I need an API key to add a Facebook Like button to website?

I want to show a Like button on some product pages on a website, when a user clicks Like, I want to show the product image along with the link on their wall. Can this be done without an API key?
YOu dont need a API key to add FB like to your website, just copy the iframe code and past it into your HTML.
Check this out for your info:
http://developers.facebook.com/docs/reference/plugins/like/
You can not publish to a users wall without permission to do so. And to get this permission you need an API that the user authorizes.
Also I don't think that a user wants a wall post when simply clicking on 'like'. It will appear on his wall anyway as 'xy likes this'.
I'm a Platform Engineer, you can choose the image and text that gets displayed in the news feed when the user clicks the like button by using Open Graph tags in addition to the like button.
https://developers.facebook.com/docs/opengraph/
I hope this helps!
J

Resources