w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How can I use SEF form URL and escape question mark in it?

First of all it would be helpful to see more code(category Action, formBuilder code). Without the code i assume you are sending parameters (as apple and htc) and filtering in the controller.

If you want your forms URL to be SEF you have to set it yourself in forms action attribute. Symfony can help you with backend data manipulation, not with frontend. You could use javascript for dynamical action setting. First you attach onChange events to your form elements and send changed values to this function:

function changeAction(phoneModel, priceRange){
    //some logic to transform values of your form items to SEF url elements
    document.getElementById('form_id').action = "/category/" + phoneModel +
    + "/" + priceRange; 
}

When the form is submitted it will be submited to the URL you specified in forms action.





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.