How to keep changed form content when leaving and going back to HTTPS page? (works with HTTP)

You can consider the following solutions: The autocomplete Attribute (HTML5) This seems unrelated since autocomplete tells the browser to complete fields with the values based on earlier user input which were “submitted” with the form. But in my tests I saw that; after filling out the form without submitting; when I hit the forward (history) … Read more

Add span inside form’s placeholder

Here is pure css solution IE10+ .input-placeholder { position: relative; } .input-placeholder input { padding: 10px; font-size: 25px; } .input-placeholder input:valid + .placeholder { display: none; } .placeholder { position: absolute; pointer-events: none; top: 0; bottom: 0; height: 25px; font-size: 25px; left: 10px; margin: auto; color: #ccc; } .placeholder span { color: red; } <form … Read more

Dynamic row height in a SwiftUI form

Here is possible solution with fluent row height change (using AnimatingCellHeight modifier taken from my solution in SwiftUI – Animations triggered inside a View that’s in a list doesn’t animate the list as well ). Tested with Xcode 11.4 / iOS 13.4 struct MyView: View { @State var isDisclosed = false var body: some View … Read more

Pass custom options to a symfony2 form

The solution is simple, if you want your custom option to be available also in Twig template, you must use $builder->setAttribute() in buildForm method and $view->set() method in buildView() method, too. <?php namespace Acme\DemoBundle\Form\Type; use Symfony\Component\Form\AbstractType as FormAbstractType; use Symfony\Component\Form\FormBuilder; use Symfony\Component\Form\FormView; use Symfony\Component\Form\FormInterface; // For Symfony 2.1 and higher: use Symfony\Component\OptionsResolver\OptionsResolverInterface; /** * ImagePreviewType … Read more