Driver64
Forum Replies Created
-
Forum: Hacks
In reply to: How do you get a form field value into a function variableHow do you get a table field value into a function variable?
I am sure this is beginner stuff to most but I am a beginner.
I am operating a job board and am simply trying to get a field value out of a custom field and am having trouble with the syntax.
I am not sure how to point to the table where the data is (path). The date resides in a table called “Jobs” and the code is as follows:
<<td class="wpjb-column-date wpjb-last"> < <?php if($job->isnew()): ?><span class="wpjb-bulb"><?php <_e("new", "wpjobboard") ?></span><?php endif; ?> < <?php echo wpjb_date_display("M, d", $job->job_created_at, <true); ?> < <?php if(isset($job->getTag()->type[0])): ?> < <span class="wpjb-sub" style="color:#<?php echo <$job->getTag()->type[0]->meta->color ?>"> < <?php esc_html_e($job->getTag()->type[0]->title) ?> < </span> < <?php endif; ?> < </td>
[Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]
I would like to add an argument to the “IF” statement that says if the “Priority” field has a value of “Yes” then execute “class=”wpjb-bulb-pri” which be the first of the “IF” statements and this “IF” statement would terminate.
Any help would be appreciated.
https://www.driverjoblist.com