Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have this in my Form Submit
$locRedirect = "http://bricks.couponmicrosite.net/javabricksweb/index.aspx?o=" . $oc . "&c=" . $cc . "&p=" . $randomPIN . "&cpt=" . $contentCPT . "&ct=" . strtoupper($first_name) . "%20" . strtoupper($surname);
$url = new TrustedRedirectResponse($locRedirect);
$form_state->setResponse($url);
1) How can I get it to open the page in a new window I have $form['#attributes'] = array('target' => '_blank'); but it isn't working
2) It is giving a 302 message before going to http://bricks.couponmicrosite.net/javabricksweb/index.aspx. Any idea why or how I can stop it please
Thanks