Yii Framework Forum: Wizard Behavior - Yii Framework Forum

Jump to content

  • (3 Pages)
  • +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

Wizard Behavior Multi-step form handling Rate Topic: ***** 3 Votes

#41 User is offline   gdesmedt1 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 20
  • Joined: 05-January 12
  • Location:South Africa

Posted 19 July 2012 - 06:03 PM

This is an awesome extension, Thank you!

I have a question regarding visible items in the steps (after scouring the net and reading all the threads).. so here goes...

I need to add the current users ID (Yii::app()->user->id) to the final output. I can do this, but then the value is shown. The minute I try "hide" or set it's visible property to false, it's not included in the array.

Here's a snippet of the model code in step 1:


class Wizard_step1 extends CFormModel {
	public $user_id;
	public $turnover;

	public function rules() {
		return array
		(
			array('user_id, turnover', 'safe'),
		);
	}

	public function getForm() {
		
		$te = Yii::app()->user->id;
		
		return new CForm(array(
			'showErrorSummary'=>true,
			'elements'=>array(
				'user_id'=>array
				(
					'type'=>'text',
					'value'=>$te,
				),
				'turnover'=>array
				(
					'type'=>'dropdownlist',
					'items'=>array
					(,
						''=>'',    //this forces validation to check for a value, i.e. value in dropdown box not selected... won't continue to next step (for those that want this functionality :)
						'2'=>'R0m - R1.5m',
						'3'=>'R1.5m - R2.5m',
						'4'=>'R2.5m - R5m',
						'5'=>'R5m - R11.5m',
						'6'=>'R11.5m - R15m',
					)
				),



what can I do in order to set this so that the user_id is not visible to the user, but will still be added to array data at completion of all the steps? Maybe I'm doing it completely wrong and the data needs to be added elsewhere in the program? any assistance will be great!

Regards,

G
Joojooberry - Simple, Smart, Webdesign
0

#42 User is offline   David Z 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 21-July 12

Posted 05 August 2012 - 09:52 PM

Demo page broken. :(
0

#43 User is offline   demay 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 13
  • Joined: 24-August 12

Posted 24 August 2012 - 05:18 AM

Did u find any solution to ur post? pliz help me, am also stuck
demay
0

#44 User is offline   Chris Wessels 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 22-March 12

Posted 15 December 2012 - 05:20 AM

The demo page is still offline... any chance it could be put back online?
0

#45 User is offline   rchawdry 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 18-December 12

Posted 18 December 2012 - 04:59 PM

Great extension. Quick question -- When clicking on a "previous" button, a wizard page looks like it will lose any entered data by a user. Not sure if this is by design, but is there a way that the form can retain state when clicking on "previous" buttons?

Thanks.
0

#46 User is offline   DGr 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 29-December 12

Posted 29 December 2012 - 04:47 AM

Couldn't get to demo or documentation page online (is it just me?)
... but I did manage to view demo app by downloading, installing (and tweaking) locally. Looks great!

Only thing missing fo me is the Documentation (Wizard_Behaviour_Manual.pdf), which is not in the list of available Downloads.
Any chance of adding it there?

Thanks
0

#47 User is offline   opus 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 08-July 12
  • Location:Russia

Posted 27 January 2013 - 09:53 AM

Here is the link www.scribd.com/fullscreen/110910020?access_key=key-yo2a3actxxs16pkkob1 where you can find docs
1

#48 User is offline   syskrack 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 04-February 13

Posted 04 February 2013 - 01:38 PM

The issue reported in the reply #36 of this topic about the PBN skipping steps, seems a bug to me, the patch on 'WizardBehaviour::_parseSteps($steps)' suggested by Say_Ten works perfectly:

@WizardBehaviour.php Line:556 
-				$parsed[$label] = $step;
+				$parsed[] = $step;

0

Share this topic:


  • (3 Pages)
  • +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users