Yii Framework Forum: Print The Form - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Print The Form Rate Topic: -----

#1 User is offline   ahmad albab 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 39
  • Joined: 07-January 14

Posted 12 March 2014 - 04:05 AM

hi guys...
can I know how to print the data from form?

this is example for the form that I want to print...
http://wiki.smartjob...e=1362374279000

thank you...

Attached File(s)


0

#2 User is offline   Johnny Gan 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 197
  • Joined: 30-May 13

Posted 12 March 2014 - 01:22 PM

See if this extension is good for you:
http://www.yiiframew...nsion/printout/
0

#3 User is offline   ahmad albab 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 39
  • Joined: 07-January 14

Posted 12 March 2014 - 02:08 PM

View PostJohnny Gan, on 12 March 2014 - 01:22 PM, said:

See if this extension is good for you:
http://www.yiiframew...nsion/printout/



thank you Johnny..I will try it first...
any problems, I will inform...:)
0

#4 User is offline   ahmad albab 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 39
  • Joined: 07-January 14

Posted 12 March 2014 - 04:25 PM

hi..
I already try to add the extension but I guess it didn't work for me...
either I don't understand or maybe the way I done it wrong...
anyone can explain to me so that I can understand??

I also try to do LIKE THIS POST, but it is also didn't work for me...

if you open the link that I given, you will see this code...
'columns'=>array(
        array(
            'name'=>'nama',
            'type'=>'raw',
        ),
        array(
            'name'=>'alamat',
            'type'=>'raw',
        ),


seriously, I don't understand this part or maybe I don't understand it at all...
what 'name'=>'nama' and 'type'=>'raw' for?? :blink:

since I not know all about Yii, I hope someone can explain this more detail so that I can't understand...

thank you...:)
0

#5 User is offline   Aneesh Asokan 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 237
  • Joined: 26-September 12

Posted 13 March 2014 - 02:31 AM

You can print a division like this using the extension
http://www.yiiframew...nsion/printout/

In view

<?php $this->widget('application.extensions.print.printWidget', array(
                   'printedElement'=>'#idprint',)); 
    ?>

<div id="idprint">

//data for printing

</div>

Thanks
Aneesh.
0

#6 User is offline   ahmad albab 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 39
  • Joined: 07-January 14

Posted 13 March 2014 - 03:57 AM

View PostAneesh Asokan, on 13 March 2014 - 02:31 AM, said:

You can print a division like this using the extension
http://www.yiiframew...nsion/printout/

In view

<?php $this->widget('application.extensions.print.printWidget', array(
                   'printedElement'=>'#idprint',)); 
    ?>

<div id="idprint">

//data for printing

</div>



thank you Aneesh for your reply...:)
I'll try to do it first...

but I've a question...
it is necessary to put hashtag(#) to this "'printedElement'=>'#idprint'," ?
0

#7 User is offline   Aneesh Asokan 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 237
  • Joined: 26-September 12

Posted 13 March 2014 - 07:06 AM

View Postahmad albab, on 13 March 2014 - 03:57 AM, said:

thank you Aneesh for your reply...:)
I'll try to do it first...

but I've a question...
it is necessary to put hashtag(#) to this "'printedElement'=>'#idprint'," ?


Yes. It represents the id of division want to print.
Thanks
Aneesh.
0

#8 User is offline   ahmad albab 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 39
  • Joined: 07-January 14

Posted 14 March 2014 - 10:33 AM

View PostAneesh Asokan, on 13 March 2014 - 07:06 AM, said:

Yes. It represents the id of division want to print.


hi Aneesh...
I already try it but it also doesn't work for me... :(

it error;

Quote

Invalid argument supplied for foreach()


what should I do?
0

Share this topic:


Page 1 of 1
  • 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