beginForm does not add URL suffix

The beginForm() function ignores the URL suffix setting - does not add it to the URL

CHtml::beginForm(‘basket/add’,‘post’,array(‘id’=>‘productForm’,‘name’=>‘productForm’));

does not produce the correct form tag.

CHtml::beginForm($this->createUrl(‘basket/add’),‘post’,array(‘id’=>‘productForm’,‘name’=>‘productForm’));

does produce the correct form tag.

Rgds to all,

Synthetic

Hi,

Same problem observed with


CHtml::link

The returned result lacks the base path of the web application. So if I want to have a route like http://localhost/hw/index.php?r=hello/index, I end up with http://localhost/hello/index.

Example code from a view:


<h1>Welcome!</h1>

<p>To view the message go to <?php echo CHtml::link('here', $this->createUrl('/hello/show')); ?></p>

<p>To edit the message go to <?php echo CHtml::link('here', '/hello/edit'); ?></p>



The first link has the proper path, while the second doesn’t.

Kind regards,

Bill