Form Helper: form_open with NO "/index.php" in action attribute? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11) +--- Thread: Form Helper: form_open with NO "/index.php" in action attribute? (/showthread.php?tid=77053) |
Form Helper: form_open with NO "/index.php" in action attribute? - mlurie - 07-15-2020 Is there a supported method to to use the Form Helper's form_open method without it writing "/index.php" in the action attribute of the form tag short of manually writing the tag? echo form_open('action') outputs: <form action="https://domain.tld/index.php/action" method="post" accept-charset="utf-8"> I would prefer echo form_open('action') to output: <form action="https://domain.tld/action" method="post" accept-charset="utf-8"> I am currently using the following workaround: echo str_replace('/index.php', '', form_open('action')); RE: Form Helper: form_open with NO "/index.php" in action attribute? - jreklund - 07-16-2020 You will need to remove index.php from this setting (config/config.php) PHP Code: /* RE: Form Helper: form_open with NO "/index.php" in action attribute? - mlurie - 07-16-2020 I am using CodeIgniter 4 and found the setting in \app\Config\App.php. Thanks for pointing me in the right direction. |