Tagged Questions
0
votes
1answer
14 views
Symfony2 mthaml syntax
Situation:
I have to place many scripts in "javascripts" native twig block.
- javascripts 'assets/js/jquery.js' 'assets/js/some1.coffee' 'assets/js/some2.coffee' ... 'assets/js/someN.coffee' ...
0
votes
1answer
25 views
Use viewer.js plugin in symfony2
I need help to install http://viewerjs.org plugin to view pfd files in Symfony2. That plugin contains css/js files and images with its own folder structure.
This is what I have done:
1) Copy all js ...
1
vote
1answer
48 views
Where to place images in assetic when references from javascript
I am using assetic in Symfony 2. I have JavaScript and CSS loaded using assetic.
I need to reference some images in one of my JS files. I am new to assetic, and cannot find any documentation on ...
-1
votes
0answers
37 views
incompatibility between Twig and JavaScript [closed]
I am using the Skeljs (skeljs.org) framework for responsible web design. This framework does not define the css in the header of the index, but already handles the framework itself.The problem I've ...
0
votes
3answers
50 views
jquery load function with a twig template file
i'm trying to load a twig file template with the load() function of jquery.
But i don't know how to write the path for the template .
Is it like this ?
...
0
votes
1answer
32 views
Symfony - Cookbook “add new tag” in embed form isn't working
I've followed the Symfony cookbook part called "How to Embed a Collection of Forms" and added this javascript function to have a link that adds a new tag field. The form is right, displaying the Task ...
0
votes
1answer
42 views
Symfony2: Ajax form submission with dropdown div refresh
Let's start from the begining.
I've got tab-panned layout with links. When you click a link there is a drop-down checkbox form injected right into html via
$(".dropdown-toggle").click(function() {
...
0
votes
0answers
115 views
arrayCollection In Javascript
i have this Action
public function testAction($array){
/**
* @var $array \Doctrine\Common\Collections\Collection
*/
return array(
'array_like' => ...
0
votes
1answer
63 views
AngularJS html5mode = true error when I access directly url with params
I have an application developed with Angularjs and Symfony 2, I enabled the html5 mode to get friendly urls.
The application is integrated with Symfony 2.3 to response at services.
app.js
...
0
votes
1answer
24 views
Disable validation checks on a single non mapped choice field
I have looked at a lot of the relevant questions for this and cant seem to find one that fits my needs. The answers that come closest solving my problem involve adding the choices to the choice list ...
0
votes
0answers
36 views
how to remove error of symfony2?
i make an index form but when i populate the fields it returns error like this,how to remove this error?
i make an index form but when i populate the fields it returns error like this,how to remove ...
1
vote
1answer
43 views
retrieve parameters.yml in javascript
Can i retrieve the global parameters in file javascript?
i have for example
twitter.app_secret: my_token
how can i retrieve it in file Javascript ?
for now i use this
<script ...
0
votes
1answer
22 views
Symfony2 Web Profiler disappeared ajax calling but invalid response in google chrome only
Im just working on a project with symfony2 and yesterday i started to design it.
Not i just noticed that the web profiler is not visible.
I tried everything! it is active in the config_dev, body tags ...
0
votes
4answers
87 views
Translations shared between Symfony2 and Angular.JS
I am looking for a good way to share my translations between my Symfony2 App and my Angular.JS App, they are essentially the same app, however they act very differently.
First of all I have made a ...
0
votes
0answers
27 views
Parse Symfony2 session data in javascript
I write chat on socket.io + Symfony2. My Symfony is configured to store session in mysql database. In socket.io server application I get this session from mysql, but very big problem is parse this ...
0
votes
3answers
56 views
How to load JQuery from the own server, when it is not avaiable from the original source?
I'm trying to load JQuery from //ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js:
<script src="{{ asset('//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js') ...
0
votes
1answer
76 views
strophe.js and openfire who terminates connection on page reload?
I am using symfony2 to build some app. In that app I have chat app. I am using attached session in chat.
1) On login I fire up event listener to catch user/pass from login, connect to openfire ...
1
vote
1answer
94 views
Best way to handle graphing and display of large data sets
Our website provides various data services to our clients; one of which is gauge data. Some gauges log information every 15 minutes, some every minute. This data is sent to our SQL database.
All of ...
2
votes
0answers
28 views
Assetic javascripts creating empty file from a non-empty source (inside bundle)
I am using Assetic within a twig template to specify 2 JS files to utilize from my bundle
{
% javascripts
'@JiraExtendedReportsBundle/Resources/public/js/jquery-2.0.3.min.js'
...
0
votes
1answer
51 views
FOS Facebook Bundle - User logged out at next visit
in my symfony 2.3 application I added FOS Facebook to handle the login.
The login works great (thanks to stack overflow!).
But the following scenario fails:
user uses fosfacebook to login
user ...
0
votes
1answer
60 views
Update AngularJS current route failed
I work on an editor which use AngularJS for client side and symfony 2 for server side (I think using symfony is trivial for my problem).
So my url have two parts :
- symfony part to access to the ...
0
votes
1answer
128 views
How to make a POST Ajax request with Symfony and Jquery
I need to store some map parameter in my symfony project, to do this i need to implement some Ajax in my view which will be able to pass some info to the controller.
I read the docs, try to write ...
0
votes
0answers
23 views
Symfony2, assetic and Google Closure Templates
I am working on a project based on Symfony2 and I am using Google Closure Templates to manage HTML from javascript. I wrote a filter for assetic which nicely compile *.soy files into *.js files and ...
1
vote
1answer
58 views
Symfony 2.3.6 nested forms
I am trying to have a form with a collection of forms that will allow me to fill in weekly data. I have an Entity that is for the week with a few stats
/**
* @ORM\Column(type="integer", ...
1
vote
2answers
123 views
Using require.js and Asynchronous Module Definition (AMD) possible in a Symfony2 project?
I'm currently modernizing my workflow especially in the frontend part and started using require.js, qunit, backbone.js, underscore.js, etc. in some of my last project that didn't require a backend.
...
1
vote
2answers
77 views
How to use TinyMCE editor in symfony2 twig file with textarea
I am not able to get TinyMCE editor into my twig file. my twig file code is as below
{% block content %}
{{ tinymce_init() }}
<div class="content">
<h2 ...
0
votes
1answer
120 views
How to add buttons of add and delete with each dynamic row?
i make a dynamic form but when i click add row it add row at the last and when i click remove button it remove the last row i want to add(2 buttons one for add and one for delete with each row when i ...
0
votes
4answers
78 views
how to change selected value of combobox?
I make a combobox.
I get data from database and set the value of firstname to combobox selected but it is not working. Here is my code:
...
1
vote
1answer
59 views
Get form value from Sonata Admin
I would like get value from form of Sonata Admin, but in source html i have for example:
<input type="text" class="span5" maxlength="255" required="required" name="s215268450cfc7[username]" ...
0
votes
0answers
31 views
Include Javascript in Symfony2 form widgets
I have created my own little Symfony2 form type. For this to work properly, I need to include a js library. While that was a simple task when using this new form type in a single web application, it ...
-1
votes
1answer
47 views
Basic Ajax in Symfony [closed]
I am new to symfony. Currently, I am importing a JS file into a Twig template. In this JS file I have a very basic ajax call which fails to link to the php file. I was wondering if someone can advise ...
0
votes
0answers
22 views
Google Closure Templates with Symfony2
I would like to use Google Closure Templates (*.soy files)in my Symfony2 project. I know that assetic supports standard compiler.jar from Google Closure Tools to minify js files, but I can't find ...
0
votes
1answer
103 views
variable Twig in Javascript
How can i pass {{app.user}} into Javascript ?
for now I do a block like;
<script type="text/javascript">
var app_name = '{{ app_name }}';
var app_url= '{{ app_url }}';
var ...
2
votes
1answer
78 views
how to get form id from ajax and set it in click function in symfony2
i want to store id in global variable and then store this id for form edit
here is my xml request:
if($request->isXmlHttpRequest()) {
$response = new Response();
$output = ...
1
vote
1answer
45 views
how to use ajax result in click function?
i make a form in symfony when i submit form through ajax then i store (result.id) in a variable and then i used this variable in click function but the error occur invoiceid does not exist in ...
4
votes
1answer
123 views
how to add remove and add button with lines using jquery?
i want to add remove and add buttons with the fields on row hover like this
https://edgelogics.freshbooks.com/menu.php?route=createInvoice
but my dynamic fields generate on button click
which ...
0
votes
0answers
36 views
Persist all entities in an embedded form
I have two class : Grade and Holiday.
A Grade can contains zero, one or many Holidays.
So I have a form that looks like this :
I can add or delete holidays with some Javascript.
The issue is in ...
0
votes
0answers
283 views
how to get value from dynamic select boxes and pass this value to ajax data?
I made a dynamic table row in symfony2. When I select an option from the select box, I want to pass the value to the Ajax and store the corresponding result in dynamic fields like description, ...
0
votes
0answers
40 views
Symfony Assetic - part_1 in url
Okay so I've been searching all over for some input into this but haven't found anything to help directly (only mentions of this problem in relation to something else).
Basically I'm having problems ...
0
votes
0answers
35 views
Symfony2 Assetic Custom File Combiner
I'm working on a system which needs to have a number of files combined together with a custom combiner (i.e., not just glued together with Assetic).
The combiner is primarily to handle ordering them ...
2
votes
3answers
45 views
Write link to images in .js file - Symfony2
I'm using Symfony2 and I have some links to images in my .js file - like this:
$(this).attr('src', 'img/icons/black/icon1.png');
Of course they don't work this way :( How should I set them?
At ...
0
votes
1answer
106 views
How to use Dropbox Datastore API in Symfony2
I've developed an HTML5 app using Symfony2 with my own data model (using Doctrine2). Right now, I want to integrate my app with others apps (for iOS and Android), sharing and syncronizing the same ...
2
votes
1answer
62 views
Embed collection of form
I'm stuck with an embed collection of form.
I have a Holiday form consisting of three fields : a name, a begin and an end.
Note that begin and end are managed by Bootstrap date-time picker
Then I ...
0
votes
0answers
64 views
How can I load google maps api with ajax inside symfony2 templates
I´m working in a project with symfony2 and google maps. I have an inheritance of twig templates.
layout_user.html.twig is the father where I have the div in which I load the google maps.
...
1
vote
1answer
37 views
Jquery get() requires 2 passes?
With jquery & ajax in a Symfony application, a button click is intended to retrieve a couple of properties of an entity. The first click of the button returns undefined; further clicks retrieve ...
-1
votes
3answers
130 views
symfony2 + javascript framework
My quick question is, should I begin using a javascript framework at the same time that I build my project with symfony or can I do it later without major troubles?
I have a small project of one page ...
0
votes
2answers
73 views
Check if inputs form are empty jQuery
How can I check in jQuery if inputs with name denominationcomune_{{loop.index}} and denominationcomune_{{loop.index}} are empty not all inputs ?
I have a twig like this:
<form action="" ...
1
vote
1answer
72 views
Symfony2 : Hide form field with display:none
I have a serious problem about symfony2 forms, the issue that I created a very long form,so I build it with parts(fields),so In the same form sometime I sumbit this part(fields) and I hide another ...
0
votes
0answers
47 views
How to generate the string with variable in symfony
I want to use the code:
document.getElementById("btn").setAttribute("href", "{{ path('deletecontact', { 'id': "idx" }) }}");
to add attribute to the button to delete the chosed contact.
The idx ...
0
votes
1answer
39 views
How do i save a javascript variable to my form type in Symfony
I have this Javascript variable I want to use in my Form Type
// Layout.html.twig
<script type="text/javascript">
$(document).ready(function(){
...