View Selected Record

QuestionsView Selected Record
Rida Allam asked 4 years ago

Dear Abu Ghufran,

I'm using a Licensed version 1.5.2. Is it possible to hide the fields that contain a Null value from the view selected record form. I don't want to add or delete data just view them in the form if their value not equal null.

Another question, how can we format a field in the view selected record form to be from right to left as this field has Arabic text.

Thank you in advance for your help.

Rida.

7 Answers
Abu Ghufran answered 4 years ago

$opt["view_options"]["beforeShowForm"] = "function(){ set_fields_display(); }";

<script>
function set_fields_display()
{
if ( jQuery("#trv_gender").html() == '')
jQuery("#trv_gender").hide();';
}
</script>

It will remove the row for gender if it's blank. I've not tested this JS, you can debug if required.

For RTL,

You can override css on page.
Inspect form element using firebug, e.g. column gender will have <td id='v_gender'>
So, you can have css like:

<style>
#v_gender { direction: rtl; }
</style>

PS: Your email is not in our Customer's list. If you are using free version, i'd recommend to buy technical support subscription for continued replies.

Rida Allam answered 4 years ago

Hi,

Thank you for your support. The RTL is working fine. But still have an issue with hiding the null row. I have tried the above code with no success.

I highly appreciate if you could put a working demo for that.

Kind regards,

Abu Ghufran answered 4 years ago

I think i picked wrong selector in IF clause. If you inspect with firebug, the TD that will have data has id "v_<field>"
So, the condition would be:
<script>
function set_fields_display()
{
if ( jQuery("#v_gender").html() == '')
jQuery("#trv_gender").hide();';
}
</script>

#trv_field – represent whole row
#v_field – represent cell data

As this is custom jQuery based hack for requirement, you can try some variants byself.

Rida Allam answered 4 years ago

Hi,

Thank you for your reply. I have tested the function with all possible conditions but not working. Is there another way that we can use to solve this.

Kind regards,

Abu Ghufran answered 4 years ago

The above demos were to give you an idea. I've not tested this case.
Demo creation takes time, and we're already occupied in licensed customer's commitment.

PS: If you are using free version, i'd recommend to buy technical support subscription for continued replies. Otherwise let us know order number for continued support.

Rida Allam answered 4 years ago

Thank you.

I'm using a full version not a free version. However, I will keep trying.

Best regards.

Abu Ghufran answered 4 years ago

Ok, thanks for the update.
Please update us your order number.

We can then work on your ticket on priority.

Your Answer

7 + 7 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?