Fórumok

Regarding web content structure

thumbnail
Charu Babbar, módosítva 11 év-val korábban

Regarding web content structure

Regular Member Bejegyzések: 167 Csatlakozás dátuma: 2011.09.13. Legújabb bejegyzések
Hi,

I have make a structure in web content in which i make text field repeatable.


when I am coming at form then i click on add(+) button for making its instance. and then multiple instances of same field becomes.

If we enter any data in that text field then it should also again and again comes in text field. I wants when we make the instance of that text field then its data should not be replicated.

How Can I avoid the replication of data when i make the instances of same text field.


Thanks
Hiral Ramavat, módosítva 11 év-val korábban

RE: Regarding web content structure

Regular Member Bejegyzések: 103 Csatlakozás dátuma: 2012.02.13. Legújabb bejegyzések
Hi Charu,

How you are getting the data of those text boxes in your template?

Because you can not get directly with the name of that text field, like this - $text-field.getData()

You have to make the for loop for the siblings of that text fields.

Below is the example code for that you have to write in your template.

#foreach($item in $text-field.getSiblings())
<b>$item.getData()</b>
#end

Where "text-field" is the name of your text-field.

Hope it will help you.

Thanks,
Hiral
thumbnail
Charu Babbar, módosítva 11 év-val korábban

RE: Regarding web content structure

Regular Member Bejegyzések: 167 Csatlakozás dátuma: 2011.09.13. Legújabb bejegyzések
When I click at gui + button for adding more. I have enter some text in 1 text field. then click the + button for add more text field, then data in above box also comes with that clone.

I wants clone of one text field comes empty.

How can I acheive this.

Thanks
Hiral Ramavat, módosítva 11 év-val korábban

RE: Regarding web content structure

Regular Member Bejegyzések: 103 Csatlakozás dátuma: 2012.02.13. Legújabb bejegyzések
I have tried this thing with my machine setup.

I am using Liferay 6.0 EE SP2 and i am not able to reproduce this issue.

Which version of liferay are you using?

May be this is OOB issue or something you have customized with the web content portlet.

Thanks,
Hiral
thumbnail
Charu Babbar, módosítva 11 év-val korábban

RE: Regarding web content structure

Regular Member Bejegyzések: 167 Csatlakozás dátuma: 2011.09.13. Legújabb bejegyzések
Hi,


What steps u follow to check this? Can u describe it!
thumbnail
Charu Babbar, módosítva 11 év-val korábban

RE: Regarding web content structure

Regular Member Bejegyzések: 167 Csatlakozás dátuma: 2011.09.13. Legújabb bejegyzések
Charu Babbar:
Hi,


What steps u follow to check this? Can u describe it!


Like in this image:Fox textfield + button then this field comes below again and its data: "Todds" comes with it.

I wants when I click on add(+) button then text field comes empty. I can fill this. But it should be emplty.
How can I do this? Plz anybody help..
thumbnail
Charu Babbar, módosítva 11 év-val korábban

RE: Regarding web content structure

Regular Member Bejegyzések: 167 Csatlakozás dátuma: 2011.09.13. Legújabb bejegyzések
Charu Babbar:
Charu Babbar:
Hi,


What steps u follow to check this? Can u describe it!


Like in this image:Fox textfield + button then this field comes below again and its data: "Todds" comes with it.

I wants when I click on add(+) button then text field comes empty. I can fill this. But it should be emplty.
How can I do this? Plz anybody help..



Hi,

Anybody in Liferay staff can answer me this question. Is it possible or not? If possible then How? If not then why not?

Plz tell me its urgently..

Thanks
thumbnail
Charu Babbar, módosítva 10 év-val korábban

RE: Regarding web content structure

Regular Member Bejegyzések: 167 Csatlakozás dátuma: 2011.09.13. Legújabb bejegyzések
I got one solution for this. Using jquery in js file. I have acheived this. emoticon