[SOLVED] replace select box with icon on profile

13 years 10 months ago #137104 by evdoorne
HI, I have a question regarding the following.

I have created a field in the form of a checkbox. Now, I would like to have the contents of that field appear in the profile page as an icon instead of the standard Yes/No text. I also want the icon to change depending on the contents of the field. For example, if the selector box was checkedm, i want a green cross to appear in its place on the profile page, whereas if the checkox was not checked, i want ared cross to appear.

How can I make this work? Do I need to change the code? If so, which file(s) need to be changed and where?

Thank you and best regards,

Erik

Post edited by: krileon, at: 2010/07/06 18:39

Erik

Please Log in to join the conversation.

13 years 10 months ago #137115 by nant
evdoorne wrote:

HI, I have a question regarding the following.

I have created a field in the form of a checkbox. Now, I would like to have the contents of that field appear in the profile page as an icon instead of the standard Yes/No text. I also want the icon to change depending on the contents of the field. For example, if the selector box was checkedm, i want a green cross to appear in its place on the profile page, whereas if the checkox was not checked, i want ared cross to appear.

How can I make this work? Do I need to change the code? If so, which file(s) need to be changed and where?

Thank you and best regards,

Erik


try using a delimiter field to do this.

Please Log in to join the conversation.

13 years 10 months ago #137122 by evdoorne
Hello Nick,

Thank you for the suggestion. I tried it but I do not see how I can make this a conditional display of icons. I can display an icon with a delimiter field but how can I make the icon that appears dependant upon the contents of another field? Could you please suggest how that should be achieved with delimiter fields ?

Erik

Erik

Please Log in to join the conversation.

13 years 10 months ago #137126 by nant
evdoorne wrote:

Hello Nick,

Thank you for the suggestion. I tried it but I do not see how I can make this a conditional display of icons. I can display an icon with a delimiter field but how can I make the icon that appears dependant upon the contents of another field? Could you please suggest how that should be achieved with delimiter fields ?

Erik


From Kyle's tutorials:
www.allmysocials.com/articles/1-tutorials

(will be added to future CB Documentation versions)

you can try:

[cb:if cbfield="value1"]put html code to show image 1[/cb:if]

[cb:if cbfield="value2"]put html code to show image 2[/cb:if]

Please Log in to join the conversation.

13 years 10 months ago #137129 by evdoorne
Hello Nick,

this works great. Thank you !

Erik

Erik

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.169 seconds

Facebook Twitter LinkedIn