In my widget controller. In this method:
function UserReviewsCommentFormStepOne() {
$URLParams = Director::urlParam('Action');
//$Segment = $URLParams['Action'];
//$a = new HTTPRequest();
var_dump($URLParams);
exit();
Session::clear('StepOneData');
$fields = new FieldSet(
new TextareaField("Pros","What did you like about this room?"),
new TextareaField("Cons","What did you not like in this room?"),
new OptionsetField("RecommendRoom",'Do you recommend this room?',array(
'Y'=>'Yes',
'N'=>'No'
),'Y'
)
);
$actions = new FieldSet(new FormAction('doUserReviewsCommentFormStepOne', 'next'));
$validator=new RequiredFields('Pros','Cons');
$form = new Form($this, 'doUserReviewsCommentFormStepOne', $fields, $actions);
return $form;
}
Also, I added a rule in my_config file for the thing that you said occur.
Something like this:
Director::addRules( 100, array(
'reviews/$Action' => 'UserReviewsWidget_Controller'
));