Sir Redityo,
Is it possible to hide the form field with no value or with default selected value in the REVIEW PAGE SECTION??? already found the script section in view-function.php but dont know how to execute..
THanks
Sir Redityo,
Is it possible to hide the form field with no value or with default selected value in the REVIEW PAGE SECTION??? already found the script section in view-function.php but dont know how to execute..
THanks
To hide a field with no value, try to edit your "view-functions.php" and go around line 2334 ~ 2350, you will see these code :
foreach ($entry_details as $data){
if($toggle){
$toggle = false;
$row_style = 'class="alt"';
}else{
$toggle = true;
$row_style = '';
}
$entry_data .= "<tr {$row_style}>\n";
$entry_data .= "<td width=\"40%\"><strong>{$data['label']}</strong></td>\n";
$entry_data .= "<td width=\"60%\">".nl2br($data['value'])."</td>\n";
$entry_data .= "</tr>\n";
}
try to replace with this one
foreach ($entry_details as $data){
if (empty($data['value']) || ($data['value'] == '')) {
continue;
}
if($toggle){
$toggle = false;
$row_style = 'class="alt"';
}else{
$toggle = true;
$row_style = '';
}
$entry_data .= "<tr {$row_style}>\n";
$entry_data .= "<td width=\"40%\"><strong>{$data['label']}</strong></td>\n";
$entry_data .= "<td width=\"60%\">".nl2br($data['value'])."</td>\n";
$entry_data .= "</tr>\n";
}if (empty($data['value']) || ($data['value'] == '')) {
Hi Sir Redityo thanks for this.. But when testing. it does not hide the <tr> or the field without value. but when i put some value at this line
($data['value'] == 'some value here'))
and when typingHmmm.. it's work fine with me when I test with a "text box" field. However I think the code need to be updated, first try to update the code from :
if (empty($data['value']) || ($data['value'] == '')) {
continue;
}
to
if ((empty($data['value']) || $data['value'] == ' ') &&
$data['value'] !== 0 && $data['value'] !== '0') {
continue;
}
that code should handle options element like drop down to be hide or check box field in review page. Then edit your "view-functions.php" file again and go to around line 2438 ~ 2453, you will see these code :
foreach ($entry_details as $data){
if($toggle){
$toggle = false;
$row_style = 'class="alt"';
}else{
$toggle = true;
$row_style = '';
}
$entry_data .= "<tr {$row_style}>\n";
$entry_data .= "<td width=\"40%\"><strong>{$data['label']}</strong></td>\n";
$entry_data .= "<td width=\"60%\">".nl2br($data['value'])."</td>\n";
$entry_data .= "</tr>\n";
}
replace with this one
foreach ($entry_details as $data){
if ((empty($data['value']) || $data['value'] == ' ') &&
$data['value'] !== 0 && $data['value'] !== '0') {
continue;
}
if($toggle){
$toggle = false;
$row_style = 'class="alt"';
}else{
$toggle = true;
$row_style = '';
}
$entry_data .= "<tr {$row_style}>\n";
$entry_data .= "<td width=\"40%\"><strong>{$data['label']}</strong></td>\n";
$entry_data .= "<td width=\"60%\">".nl2br($data['value'])."</td>\n";
$entry_data .= "</tr>\n";
}
Those code will handle review page when using advance embed code
You must log in to post.