Hello everyone,
Can you clone a page generated by appgini with a different name?
Table_one_view.php = xxx_view.php
Table_one_dml.php = xxx_dml.php
Etc etc
The container table is table_one, but I must enter default values for 2 different operators, which put different arguments.
Is there any other method?
Thank you
clone a page generated by appgini with a different name
-
- Veteran Member
- Posts: 31
- Joined: 2013-04-19 13:36
Re: clone a page generated by appgini with a different name
Yes, you could do that but will have to manually link to the cloned xxx_view.php page. You should also update the value of in the cloned file.
Code: Select all
$x->ScriptFileName
AppGini plugins to add more power to your apps:
- DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
- Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
- Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.
-
- Veteran Member
- Posts: 31
- Joined: 2013-04-19 13:36
Re: clone a page generated by appgini with a different name
Thanks Ahmad!
Another question on the same subject.
I'm following the online course and doing tests.
If you want to set the default values with a jquery trigger, instead of cloning the pages, I managed to set the default values, but they do not appear in the lookup table view.
$j('#ID_01-container').on('change', function(){
if($j('#ID_01-container').val() == '125') {
$j('#ID_02').val('218');
}
})
ID_01 lookup 01
ID_02 lookup 02
The value of ID_02 is right [console: $j('#ID_02').val() = 218] but no screen is displayed but only if the record is not saved.
Another question on the same subject.
I'm following the online course and doing tests.
If you want to set the default values with a jquery trigger, instead of cloning the pages, I managed to set the default values, but they do not appear in the lookup table view.
$j('#ID_01-container').on('change', function(){
if($j('#ID_01-container').val() == '125') {
$j('#ID_02').val('218');
}
})
ID_01 lookup 01
ID_02 lookup 02
The value of ID_02 is right [console: $j('#ID_02').val() = 218] but no screen is displayed but only if the record is not saved.
Re: clone a page generated by appgini with a different name
Lookup drop-downs are created using a special JavaScript component named "Select2" ... The part in your code above should be changed to:
Code: Select all
$j('#ID_01-container').val()
Code: Select all
$j('#ID_01-container').select2('val')
AppGini plugins to add more power to your apps:
- DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
- Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
- Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.
-
- Veteran Member
- Posts: 31
- Joined: 2013-04-19 13:36
Re: clone a page generated by appgini with a different name
Hello Ahmad,
maybe I explained myself wrong.
I have 2 lookup. ID_01 and ID_02.
When selecting a certain 'xxx' value in the lookup ID_01,
I should automatically value a 'yyy' default value in lookup ID_02.
This script works.
Check and intercept the value '125' in lookup ID_01 and set the value '218' in lookup ID_02.
The problem is that the value associated with the '218' ID does not appear in the lookup.
If the record is saved it is displayed correctly.
If I open the corresponding record in modal, it is correct.
Where am I wrong?
Is there another system?
Thank you
maybe I explained myself wrong.
I have 2 lookup. ID_01 and ID_02.
When selecting a certain 'xxx' value in the lookup ID_01,
I should automatically value a 'yyy' default value in lookup ID_02.
This script works.
Check and intercept the value '125' in lookup ID_01 and set the value '218' in lookup ID_02.
The problem is that the value associated with the '218' ID does not appear in the lookup.
If the record is saved it is displayed correctly.
If I open the corresponding record in modal, it is correct.
Where am I wrong?
Is there another system?
Thank you
- Attachments
-
- select2.zip
- (2.24 KiB) Downloaded 177 times
Re: clone a page generated by appgini with a different name
Because I'm not developing with AppGini I don't remember, but I will take a look into my code because I have a function for this. You have to change text too AFAIR
/Giuseppe
Professional Outsourcing Services
Professional Outsourcing Services
-
- Veteran Member
- Posts: 31
- Joined: 2013-04-19 13:36
Re: clone a page generated by appgini with a different name
Well DevGiu, I'm waiting for your function. thank you
Re: clone a page generated by appgini with a different name
OK, to specify both the value and text of the drop-down:
Code: Select all
$j('#ID_02-container').select2('data', { id: 218, text: 'Default option text here'});
AppGini plugins to add more power to your apps:
- DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
- Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
- Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.
-
- Veteran Member
- Posts: 31
- Joined: 2013-04-19 13:36
Re: clone a page generated by appgini with a different name
thank you so much !
-
- Veteran Member
- Posts: 31
- Joined: 2013-04-19 13:36
Re: clone a page generated by appgini with a different name
FYI
TRIGGER BETWEEN DIFFERENT DROPDOWN LOOKUP
table3-dv.js
aiax-table2.php
https://www.udemy.com/customizing-appgi ... ode=TENOFF
TRIGGER BETWEEN DIFFERENT DROPDOWN LOOKUP
table3-dv.js
Code: Select all
$j('#nominative-container').on('click', function(e){
// console.log(e);
var ID = $j('#nominative').val();
if(ID == '{empty_value}'){
$j('#address').val('');
$j('#address-container').select2('data', { id: '', text: '' });
}else if(ID == '1'){
$j.ajax({
url: 'hooks/aiax-table2.php',
data: { ID: 1 },
success: function(data){
$j('#address').val(1);
$j('#address-container').select2('data', { id: 1, text: data });
}
});
}
$j('#address').val('');
$j('#address-container').select2('data', { id: '', text: '' });
});
Code: Select all
<?php
$currDir = dirname(__FILE__) . '/..';
include("$currDir/defaultLang.php");
include("$currDir/language.php");
include("$currDir/lib.php");
$ID = intval($_REQUEST['ID']);
$address = sqlValue("select address from table2 where id='{$ID}'");
echo $address;
?>
- Attachments
-
- JS-PHP.7z
- (611 Bytes) Downloaded 181 times
Re: clone a page generated by appgini with a different name
I understand it's working now, Daniele, right?
AppGini plugins to add more power to your apps:
- DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
- Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
- Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.
-
- Veteran Member
- Posts: 31
- Joined: 2013-04-19 13:36