Category : html

I am working on Symfony 4.4. To refresh a table, users select three options with an input: InProgress Finished All Then they must press a validate button. I want to improve the use of this page by automating the refresh of the table. Currently on my model I have AJX which allows me to retrieve ..

Read more

I used the last answer from this question to Add Lines to my Poll which i am creating in Symfony but the string i am appending is a bit longer then the one in the answer (‘<div><input type="text" name="mytext[]"/><a href="#" class="delete">Delete</a></div>’) Mine looks like that (with twig, u don’t have to understand everything in there, ..

Read more

simply i have string like: <h2 Article name</h2>This is an idea.<ul style="color:green;"><li>option 1</li><li>option 2</li><li>option 1<li></ul> As you can see it is not valid, how can symfony or just PHP detect this and return where the error is? I have found the following code: private function validateHTML($string) { preg_match_all(‘#<(?!meta|img|br|hr|inputb)b([a-z]+)(?: .*)?>#iU’, $string, $result); $openedTags = $result[1]; preg_match_all(‘#</([a-z]+)>#iU’, ..

Read more

C:projet1locationvoiture>php bin/console doctrine:database:create In AbstractPostgreSQLDriver.php line 79: An exception occurred in driver: could not find driver In PDOConnection.php line 31: could not find driver In PDOConnection.php line 27: could not find driver doctrine:database:create [-s|–shard SHARD] [-c|–connection [CONNECTION]] [–if-not-exists] [-h|–help] [-q|–quiet] [-v|vv|vvv|–verbose] [-V|–version] [–ansi] [–no-ansi] [-n|–no-interaction] [-e|–env ENV] [–no-debug] [–] Source: Symfony..

Read more

composer require orm-fixtures –dev Using version ^3.3 for doctrine/doctrine-fixtures-bundle ./composer.json has been updated Running composer update doctrine/doctrine-fixtures-bundle Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages. Problem 1 – doctrine/doctrine-fixtures-bundle[3.3.0, …, 3.3.2] require doctrine/data-fixtures ^1.3 -> satisfiable by doctrine/data-fixtures[v1.3.0, …, 1.4.4]. – doctrine/doctrine-fixtures-bundle 3.3.1 ..

Read more

In my application I have a procedure which export data in an xls file. To do so It use this kind of formatting: Plain Text: mso-number-format:@ Format a number to 2 decimal places: mso-number-format:"0.00" Comma separators with 2 decimal places: mso-number-format:#,##0.00 Date Time Formating: American date: mso-number-format:mm/dd/yy Month name: mso-number-format:d-mmm-yyyy Date and Time: mso-number-format:d/m/yyyy h:mm ..

Read more

The main problem (no label for choosen filname in bootstrap 4 upload field) was solved with the plugin (https://github.com/Johann-S/bs-custom-file-input) You can use the "bs-custom-file-input" to display the choosen filename in the bootstrap 4 file upload field. But this does not work when I use array Collections in my FormType. (to add multiple dynamically new upload ..

Read more

/** * @Route("/list", name="list_Users") */ public function list() { $form = $this->createFormBuilder() ->add(‘name’, RangeType::class) ->add(‘age’, RangeType::class) ->add(‘task’, RangeType::class) ->getForm(); $all_Users = $this->getDoctrine() ->getRepository(User::class) ->findAll(); if (!$all_Users) { throw $this->createNotFoundException( ‘database is empty or there was an error connecting to db’ ); } for ($x =0; $x < count($all_Users); $x++ ){ echo "$x"; $tmp = $all_Users[$x]->getName(); ..

Read more