Search found 461 matches
- Mon Apr 29, 2024 9:39 am
- Forum: Modules/Add-Ons
- Topic: LISE Smarty tag in an UDT
- Replies: 4
- Views: 559
Re: LISE Smarty tag in an UDT
Finally succeed in finding the error in the php error log: PHP Notice: Trying to access array offset on value of type null in /lib/smarty/sysplugins/smarty_resource_recompiled.php(52) : eval()'d code on line 18\n My UDT set as a LISE PreItem Save: $item = $params['item_object']; $id = $item->project...
- Fri Apr 26, 2024 2:05 pm
- Forum: Modules/Add-Ons
- Topic: LISE Smarty tag in an UDT
- Replies: 4
- Views: 559
Re: LISE Smarty tag in an UDT
Doh! I totally forgot to check the error log. Sadly it didn't contains much info, so it's no help at all:
Code: Select all
[26/Apr/2024:15:36:59 +0200] "POST /admin/moduleinterface.php" 500
- Fri Apr 26, 2024 1:42 pm
- Forum: Modules/Add-Ons
- Topic: LISE Smarty tag in an UDT
- Replies: 4
- Views: 559
LISE Smarty tag in an UDT
I have an UDT which gets data from one LISE Instance while presave to another LISE Instance, but it's not working (Server Error 500): $item = $params['item_object']; $id = $item->project; $smarty_data = "{LISEProjects action='detail' item='".$id."' template_detail='foo'}"; //Save...
- Thu Mar 21, 2024 2:12 pm
- Forum: Modules/Add-Ons
- Topic: Passing Default values to FormBuilder Multiselect
- Replies: 7
- Views: 29230
Re: Passing Default values to FormBuilder Multiselect
After thinking about it a bit more, I have managed to pass an array of values to a multiselect field in FormBuilder. I converted my selected values to an array and then FormBuilder wanted to accept the data. {$title = $item->title} {assign var='category' value=','|explode:"{$item->category}&quo...
- Thu Mar 21, 2024 8:43 am
- Forum: Modules/Add-Ons
- Topic: Passing Default values to FormBuilder Multiselect
- Replies: 7
- Views: 29230
Re: Passing Default values to FormBuilder Multiselect
Normally I use the default template, where I adapt it to be usable with Bootstrap. And it works fantastic in most cases, but in this case I will probably have to make a custom html template as you suggest, so that I can get many select values into a multiselect field. (I'm building a frontend editin...
- Wed Mar 20, 2024 9:07 pm
- Forum: Modules/Add-Ons
- Topic: Passing Default values to FormBuilder Multiselect
- Replies: 7
- Views: 29230
Re: Passing Default values to FormBuilder Multiselect
Yeah, i need to take my thinking hat on and look into if i could recreate the multiselect field manually in the form template, so i can preselect the multiselect values i need
- Wed Mar 20, 2024 6:53 pm
- Forum: Modules/Add-Ons
- Topic: Passing Default values to FormBuilder Multiselect
- Replies: 7
- Views: 29230
Re: Passing Default values to FormBuilder Multiselect
I use the fields ID to pass default values like value_fld12='value1,value,2,value3' , where the field is a Multiselect Field Type. And default value IS passed if there is only one value but not if there is multiple values, like in the example above. So it may not work to pass multiple values to a Mu...
- Wed Mar 20, 2024 11:27 am
- Forum: Modules/Add-Ons
- Topic: Passing Default values to FormBuilder Multiselect
- Replies: 7
- Views: 29230
Passing Default values to FormBuilder Multiselect
I'm trying to pass default values to a FormBuilder Multiselect field and it works just fine with a single value but not with multiple values. {FormBuilder form='MyForm' value_TITLEFIELD='My Title' value_MULTISELECTFIELD='value1,value,2,value3'} The help says "It may not work for more exotic fie...
- Tue Mar 12, 2024 10:13 am
- Forum: Modules/Add-Ons
- Topic: LISE Custom Search Template
- Replies: 2
- Views: 29653
Re: LISE Custom Search Template
Thank a lot Velden, that did the trick and my actionid is now consistent through all fields. My final custom search template: {$form_actionid = $actionid} <div id="{$modulealias}_search" class="card bg-contrast-0 rounded-6 border-0 shadow"> <div class="card-body p-5"> {...
- Mon Mar 11, 2024 11:39 am
- Forum: Modules/Add-Ons
- Topic: LISE Custom Search Template
- Replies: 2
- Views: 29653
LISE Custom Search Template
I am confused about how to create a custom search template. I have a number of select fields, but after each select the actionid for the subsequent fields changes and the search fails. Here is an example of a custom search template: <div id="{$modulealias}_search" class="card bg-contr...
- Fri Mar 01, 2024 11:35 am
- Forum: Modules/Add-Ons
- Topic: LISE frontend form (FormBuilder) with default values fails
- Replies: 1
- Views: 370
Re: LISE frontend form (FormBuilder) with default values fails
I have kinda solved it with a bit of a hack: In my LISE detail template i set my variables i need in my comment form: {$lesson_title="{$item->title}" scope=global} {$lesson_id="{$item->serial}" scope=global} Then in my form i use hidden fields to get the variables with "Proc...
- Thu Feb 29, 2024 1:49 pm
- Forum: Modules/Add-Ons
- Topic: LISE frontend form (FormBuilder) with default values fails
- Replies: 1
- Views: 370
LISE frontend form (FormBuilder) with default values fails
I have discovered an interesting problem, that if you set a default value for a FormBuilder form, which sends form results to LISE, you get a Database error. {FormBuilder form='capture_comment' value_fld83=$item->title value_fld82=$item->serial} LISE Database error: 0 - - Query: SELECT COUNT(alias) ...
- Wed Feb 21, 2024 12:42 pm
- Forum: Modules/Add-Ons
- Topic: LISE API Auto Generate URL from Frontend Form
- Replies: 1
- Views: 449
Re: LISE API Auto Generate URL from Frontend Form
I couldn't figure out how to get the GenerateSlug API to work, so i did a work around where i generates the slug based on an uniq serial field and the title field: /** * Load wanted LISE instance, where you wan't to save items. * If instance can't be loaded, it will silently return. */ $mod = \cms_u...
- Mon Feb 19, 2024 3:08 pm
- Forum: Modules/Add-Ons
- Topic: LISE API Auto Generate URL from Frontend Form
- Replies: 1
- Views: 449
LISE API Auto Generate URL from Frontend Form
I'm trying to trigger a GenerateSlug for items submitted from a frontend form. I have this code in my UDT, but the URL field remains empty: $obj->slug = LISE\api::GenerateSlug($params['title'], 'LISEINSTANCE'); I'm guessing the field name is wrong, and changed the code to: $obj->url = LISE\api::Gene...
- Thu Feb 15, 2024 9:10 am
- Forum: Modules/Add-Ons
- Topic: Display LISE categories hierarchy position without leading zeroes
- Replies: 2
- Views: 34183
Re: Display LISE categories hierarchy position without leading zeroes
Perfect! Thanks alot!