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.

How to show static values on a dynamic dropdown field?

Postby geocities » Wed Jan 10, 2018 11:00 pm

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

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

any help appreciated.

thank you!
geocities
 
Posts: 1
Joined: Wed Jan 10, 2018 10:51 pm

Re: How to show static values on a dynamic dropdown field?

Postby kirondedshem » Wed Jan 10, 2018 11:58 pm

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
kirondedshem
 
Posts: 330
Joined: Sat Jan 28, 2017 7:13 pm


Return to General Discussion (PHPMaker)