How to show static values on a dynamic dropdown field?

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
geocities
User
Posts: 1

How to show static values on a dynamic dropdown field?

Post by geocities »

Hello, How i can add some static values on a dynamic dropdown field?

ex.
<option value="4">value</option>

any help appreciated.

thank you!


kirondedshem
User
Posts: 642

Post by kirondedshem »

where is the dymanic drop down picking from is it from a table or view, IF so then you can create another view which adds static values to your list,
Also are the static values you want to add predefined(as in they dont change or are they dynamic as well), or do they change from time to time, explain with clear examples.

BUT a possible solution would be as follows

Assuming you have a table called items, having id and name and you were using it for drop down lookup, yet you want some other values that are not from that table to also be included in lookup.

If you want to add some items on that you can first concatenate the static values then concatenate result from actual dynamic selection

CREATE VIEW vw_with_statics AS
SELECT (4400) as id, ('My label 1') as name
UNION
SELECT (3325) as id, ('My label 2') as name
UNION
SELECT id, name from items

ORDER BY id ASC
;

Now all you have to do is connect this view to lookup instead


Post Reply