radio button break layout tab
radio button break layout tab
@Ahmed, FYI: Layout Tab in Detail View break.
Problem: When input field type = ‘radio button’ and user group permission set only to ‘View’, I’ve experienced Layout Tab breaks in Detail View.
I insert code for Layout Tab in hooks/tablename.php on function tablename_dv.
But if user group permission set to ‘Insert’, ‘Edit’, and ‘View’, Layout Tab appears as expected.
I hope you can investigate, is it a bug or not. Thanks.
My regards,
Soewandi
Problem: When input field type = ‘radio button’ and user group permission set only to ‘View’, I’ve experienced Layout Tab breaks in Detail View.
I insert code for Layout Tab in hooks/tablename.php on function tablename_dv.
But if user group permission set to ‘Insert’, ‘Edit’, and ‘View’, Layout Tab appears as expected.
I hope you can investigate, is it a bug or not. Thanks.
My regards,
Soewandi
Re: radio button break layout tab
(screenshot would help understanding this issue)
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.14 Revision 1665 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.14 Revision 1665 + all AppGini Helper tools
Re: radio button break layout tab
Thanks Mr Jan. My code to make layout tab:
If I used option list type radio button. Fieldname: goldarah, jenjang, marital --> are not appear in marital tab
If I used option list type dropdown select, those fieldnames appear are appear in marital tab (as expected).
Code: Select all
function databaru_dv($selectedID, $memberInfo, &$html, &$args) {
/* if this is the print preview, don't modify the detail view */
if(isset($_REQUEST['dvprint_x'])) return;
ob_start(); ?>
<div id="form-tabs">
<ul class="nav nav-tabs">
<li class="active"><a href="#marital" data-toggle="tab">Data Marital</a></li>
<li><a href="#kontak" data-toggle="tab">Data Kontak</a></li>
</ul>
<ul class="tab-content">
<div class="tab-pane active form-horizontal" id="marital"></div>
<div class="tab-pane form-horizontal" id="kontak"></div>
</ul>
</div>
<style>
#form-tabs .nav-tabs a{ display: block !important; }
</style>
<script>
$j(function(){
$j('#form-tabs').appendTo('#databaru_dv_form');
/* fields to move to tab data marital */
$j('#goldarah').parents('.form-group').appendTo('#marital');
$j('#jenjang').parents('.form-group').appendTo('#marital');
$j('#marital').parents('.form-group').appendTo('#marital');
$j('#pasangan').parents('.form-group').appendTo('#marital');
/* fields to move to data kontak tab */
$j('#alamat').parents('.form-group').appendTo('#kontak');
$j('#no').parents('.form-group').appendTo('#kontak');
$j('#kota').parents('.form-group').appendTo('#kontak');
$j('#kodepos').parents('.form-group').appendTo('#kontak');
$j('#tlphp').parents('.form-group').appendTo('#kontak');
$j('#tlprmh').parents('.form-group').appendTo('#kontak');
$j('#tlpktr').parents('.form-group').appendTo('#kontak');
$j('#email').parents('.form-group').appendTo('#kontak');
})
</script>
<?php
$tabs = ob_get_contents();
ob_end_clean();
$html .= $tabs;
}
If I used option list type dropdown select, those fieldnames appear are appear in marital tab (as expected).
Re: radio button break layout tab
Hi,
I believe Radio input is created differently in AppGini. So the usual $j('#FIELDNAME').parents('.form-group') will not work.
You can try
instead.
I believe Radio input is created differently in AppGini. So the usual $j('#FIELDNAME').parents('.form-group') will not work.
You can try
Code: Select all
$j('[for="FIELDNAME"]').parents('.form-group')
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: radio button break layout tab
@pbottcher, thank you for your help. I've tried your suggestion but still not success to place the radio button field in the TAB. May be this image can help.
And the code as
My regards,
Soewandi
And the code as
Code: Select all
function databaru_dv($selectedID, $memberInfo, &$html, &$args) {
/* if this is the print preview, don't modify the detail view */
if(isset($_REQUEST['dvprint_x'])) return;
ob_start(); ?>
<div id="form-tabs">
<ul class="nav nav-tabs">
<li class="active"><a href="#marital" data-toggle="tab">Data Marital</a></li>
<li><a href="#kontak" data-toggle="tab">Data Kontak</a></li>
</ul>
<ul class="tab-content">
<div class="tab-pane active form-horizontal" id="marital"></div>
<div class="tab-pane form-horizontal" id="kontak"></div>
</ul>
</div>
<style>
#form-tabs .nav-tabs a{ display: block !important; }
</style>
<script>
$j(function(){
$j('#form-tabs').appendTo('#databaru_dv_form');
/* fields to move to tab data marital */
$j('[for="goldarah"]').parents('.form-group').appendTo('#marital');
$j('[for="jenjang"]').parents('.form-group').appendTo('#marital');
$j('[for="marital"]').parents('.form-group').appendTo('#marital');
$j('#pasangan').parents('.form-group').appendTo('#marital');
/* fields to move to data kontak tab */
$j('#alamat').parents('.form-group').appendTo('#kontak');
$j('#no').parents('.form-group').appendTo('#kontak');
$j('#kota').parents('.form-group').appendTo('#kontak');
})
</script>
<?php
$tabs = ob_get_contents();
ob_end_clean();
$html .= $tabs;
}
Soewandi
Re: radio button break layout tab
Hi Soewandi,
which version of Appgini are you using?
You can try
$j('label.contains("THELABELOFTHEFIELD")').parents('.form-group')
e.g.
which version of Appgini are you using?
You can try
$j('label.contains("THELABELOFTHEFIELD")').parents('.form-group')
e.g.
Code: Select all
$j('label.contains("Gol Darah")').parents('.form-group')
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: radio button break layout tab
Hello pbottcher, I used AG Ver 24.17 (last version). With your new code: still didn't get the right results.
Anyway I thank you for your effort to help me.
My regards,
Soewandi
Code: Select all
$j('label.contains("Gol Darah")').parents('.form-group')
Anyway I thank you for your effort to help me.
My regards,
Soewandi
Re: radio button break layout tab
Hi Soewandi,
there is a typo in my code.
Please use
instead.
there is a typo in my code.
Please use
Code: Select all
$j('label:contains("Gol Darah")').parents('.form-group')
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: radio button break layout tab
Hello pbottcher, your new code still didn't work.
To Mr. Jsetzer and Mr. Pbottcher, I apologize about my English. I'll refresh my problem: fieldname defines as 'options list' can not display in Layout Tab. I insert code for Layout Tab in hooks/tablename.php on function tablename_dv.
Is this a bug or not? Many thanks for all your help.
Best regards,
Soewandi
Code: Select all
$j('label:contains("Marital")').parents('.form-group')
Code: Select all
function databaru_dv($selectedID, $memberInfo, &$html, &$args) {
/* if this is the print preview, don't modify the detail view */
if(isset($_REQUEST['dvprint_x'])) return;
ob_start(); ?>
<div id="form-tabs">
<ul class="nav nav-tabs">
<li class="active"><a href="#marital" data-toggle="tab">Data Marital</a></li>
<li><a href="#kontak" data-toggle="tab">Data Kontak</a></li>
</ul>
<ul class="tab-content">
<div class="tab-pane active form-horizontal" id="marital"></div>
<div class="tab-pane form-horizontal" id="kontak"></div>
</ul>
</div>
<style>
#form-tabs .nav-tabs a{ display: block !important; }
</style>
<script>
$j(function(){
$j('#form-tabs').appendTo('#databaru_dv_form');
/* fields to move to tab data marital */
$j('label:contains("Marital")').parents('.form-group').appendTo('#marital');
$j('#pasangan').parents('.form-group').appendTo('#marital');
/* fields to move to data kontak tab */
$j('#alamat').parents('.form-group').appendTo('#kontak');
$j('#no').parents('.form-group').appendTo('#kontak');
$j('#kota').parents('.form-group').appendTo('#kontak');
})
</script>
<?php
$tabs = ob_get_contents();
ob_end_clean();
$html .= $tabs;
}
Is this a bug or not? Many thanks for all your help.
Best regards,
Soewandi
Re: radio button break layout tab
Hi Soewandi,
actuall it is not a bug, as you add your own code, you need to know how to add the code. Different elements are represented in different ways, therefor there is not one solution to cover all possibilites.
Back to you problem.
You may also try
or
or
actuall it is not a bug, as you add your own code, you need to know how to add the code. Different elements are represented in different ways, therefor there is not one solution to cover all possibilites.
Back to you problem.
You may also try
Code: Select all
$j('.form-group.TABLENAME-FIELDNAME').appendTo('#marital');
Code: Select all
$j('[name="FIELDNAME"]').parents('.form-group').appendTo('#marital');
Code: Select all
$j('#FIELDNAME0').parents('.form-group').appendTo('#marital');
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: radio button break layout tab
Hi pbottcher,
Among your code suggestion, at last this code:
Working as intended. That “fieldname” place in Marital Tab as expected. Many thanks for your patient and valuable time to guide me.
Best regards,
Soewandi
Among your code suggestion, at last this code:
Code: Select all
$j('[name="FIELDNAME"]').parents('.form-group').appendTo('#marital');
Best regards,
Soewandi