My client is offering the user to pick a picture, crop and resize it and then display it (in a <img> DOM element). If the picture is fine, the user can upload it to the server so it can be saved.  I would like to do the upload thanks to an Aj...
I am using jQuery to edit my form which is built in Symfony.  I am showing the form in jQuery dialog and then submitting it.  Data is entering correctly in database.  But I don't know whether I need to send some JSON back to jQuery. Actually I am...
I have an embedded collection of forms, with custom data-prototype attribute. Here is how I am customizing the data-prototype   My main twig file(listingbedroomaddpage.html.twig):  <div class="bedrooms" data-prototype=         "{% filt...
I have a view called contact.html.twig. It has a form with some textfields. I want to use javascript to validate that none of the fields are empty, as well as some other rules. But I do not know where to put the .js with the definitions. I do not kno...
Is it possible to get object from twig array knowing that the index is a javascript variable   Mycontroller  public function showContactModalAction($iduser, $profil) {     $em = $this->getDoctrine()->getEntityManager();     $contacts = $em->...
I am trying to get select2 library working with symfony2 script.   I am trying to implement basic example provided https://select2.github.io/examples.html page.  Thus I added to my page header:  <!-- SELECT 2-->                             <...
I would like to know how to pass javascript variables values from twig to controller using href path in Symfony2. this is my code:   <html> <head>     <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <...
The following code is in my Twig template and it's for load a CSS file or another depending on the theme selected by the user. This works perfectly on a simple HTML page but when I try to take this to the Twig template of my Symfony application I...
I have a Symfony form submitted by Ajax request. This form contains 2 fields : a date (datepicker) and a number of days (a choiceType). I can't initialize the number of days when the form is built since it relies on the date selected. Using Javas...
I created a Symfony2 application using FOSUserBundle and FOSRestBundle. I'd like to connect other application with my Symfony application using rest api.  I need to write the Symfony password encoder function in Javascript. Actually in PHP, it go...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.