Since you didn't use the code tags, it looked like your code was not all on one-line, which it needs to be if you don't use the parenthesis.
You don't use that code for a radio button though. That code is for Multiple-Selection Menu and Multiple-Selection Checkbox profile fields. You need to use the code for For Single-Line Text Box, Multiple-Line Text Box, Single-Selection Radio Buttons, and Single-Selection Menu profile fields. |
Hi Lynne,
Is it possible to display a different image on the postbit depending on the option chosen on a single-selection menu? Example: "What is your favourite colour?" Red Blue Green Orange I've used method one but am suspecting that method two may actually be more suitable for this task. Thank you in advance, ProfC. |
You could use either template edits or a plugin to do what you want. In the examples I show, just replace 'Your 1rst option' with '<img src="image.png" alt="Red Image" height="xx" width="yy">'
|
Quote:
|
Good advices thanks for share this
|
I'm having a bit of trouble somewhere with this. I decided to go the plugin method for multiple selection fields, as it seemed to offer the means to set different things to display based on the option selected. Unfortunately, I haven't been able to get any further than it displaying "house memberships" (the field name) on the postbit.
I'm not sure whether I've even used the right method or not but the "single selection menu" method didn't appear to have the options to display a different result based on what was selected in the profile menu. Would it be possible for someone to tell me where I've gone wrong? (I get the sensation I'll be asking this a lot -sigh-) Thank you in advance :) Plugin code: Code:
if ($post['field17']) |
You want to use "==" instead of "&" in your conditionals. However, might I suggest using a switch statement instead?
PHP Code:
|
Thank you; although it appears I'm getting the same result using your version as I am with the one I added following the article.
|
What hook location are you using?
|
"postbit_display_complete" as mentioned in the article.
|
All times are GMT. The time now is 09:21 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|