Little help and I'll give you a licence to one of my add-ons

Permalink
Hi Guys

I must be having a dumb day as my head has gone blank on how to get the following to work.

I am creating and add-on for a specific client and it need to contain a project status drop down of pre-determind options. When they select one of these options the text is displayed in a field/area on the page when they publish.

Can anyone help me on how to do this?

If you can I will give a free licence to one of my add-ons.

Cheers

Chris

senshidigital
 
okhayat replied on at Permalink Reply
okhayat
So you have a block with a drop down list of predefined options. The user will add the block, choose a value and this value will be taken and displayed somewhere in the same page?
senshidigital replied on at Permalink Reply
senshidigital
Correct. I have other things on there but this is the one that I need help on.

I did this on a site years ago and just forgot how to do it.

Hope you can help.
okhayat replied on at Permalink Reply
okhayat
What if you use a Page attribute instead? Wouldn't it work? Since you need to display this value in a field/area in your page.
Sorry, but I couldn't fully understand what you're trying to achieve.
senshidigital replied on at Permalink Reply
senshidigital
Thats could be an option but I would prefer it in the block as they will be filling in other details at the same time. Saves having to go to two different places to add the info.
LucasAnderson replied on at Permalink Reply
LucasAnderson
Something like this? There are a couple blocks in the MP that use select boxes for options. Let me know if you need more direction.

<select id="ccm_googlemap_block_map_type" name="map_type">
<?php  foreach($mapObj->map_types as $map_type_key=>$constant){ ?>
<option value="<?php echo $map_type_key?>" <?php echo ($map_type_key==$mapObj->map_type)?'selected':'' ?>><?php echo $map_type_key?></option>
<?php  } ?>
</select>
senshidigital replied on at Permalink Reply
senshidigital
Thanks I'll take a look at that and let you know how I get on.

I have looked at other in a similar vain but its getting the text of the option to show on the page. The dropdown above does not show the result on the page.