Hello !
Is it possible to use a tokens input type like provided by PF with SFS ?
thks !
Hello !
Is it possible to use a tokens input type like provided by PF with SFS ?
thks !
This extension offers the possibility to create forms with responsive fields whose values adapt to the user's choices via another field. This is particularly useful for ensuring that data is consistent within the same class instance. It would be a great pity if this possibility were to disappear in the near future. Is there any hope that this great extension will be fixed to work with the latest versions of MW, SMW and PF? Thanks in advance and with all my support.
Open issue : https://github.com/SemanticMediaWiki/SemanticFormsSelect/issues/87
Also tracked with https://github.com/SemanticMediaWiki/SemanticFormsSelect/issues/89
The value returned by the SF_Select field is not that of the property entered in the query (?Has Name
) but the page that contains it. This is not what we expect, is it?
To correct this, you have to modify res/scriptSelect.js (line 99) :
element.options[i] = new Option(namevalues[i][1], namevalues[i][1]);
if (jQuery.inArray(namevalues[i][0], selectedValues) != -1) {
element.options[i].selected = true;
newselected.push(namevalues[i][1]);
}
Hi
MW 1.33 + SMW 3.02
When I have Semantic Forms Select enabled I get the error with the api.php
This is the HTML representation of the JSON format. HTML is good for debugging, but is unsuitable for application use.
Specify the format parameter to change the output format. To see the non-HTML representation of the JSON format, set format=json.
See the complete documentation, or the API help for more information.
{ "error": { "code": "internal_api_error_Error", "info": "[XVm@QqCSZXTU8d7eZpH0CAAAAUA] Caught exception of type Error", "errorclass": "Error" } }
any idea what the problem is?
Did you try to query against Sandbox? If you are experiencing the same issue than it is time to report an issue at GitHub.
Config: MW 1.32.0 + SMW 3.0.2 + SRF 3.0.1 + SF Select 3.0.0
1) It seems that latest SMW version have two different semantic search result types: List and Plain list.
You might want to use "format~Plain list" or the whole <span> tag will be considered as value.
2) In res/scriptSelect.js the SFSelect_processNameValues function is used for turning name values from 'Page (property)' results, eventually removing the brackets from the result value.
This function removes a number of leading/trailing characters from the result of the query.
I had no time to troubleshoot properly the code, but at least in my case the select options were wrongly updated no matther if the result of the query is a Page or a simple Text properties (probably missing checks and loop pointers not properly reset).
Assuming you are fine with "not post processing the result of the query" (this is my case) my quick and dirty workaround:
function SFSelect_processNameValues( values ) { var namevalues = []; for(var i=0; i<values.length; i++){ // var openBr = 0; // var doneBr = 0; // var num = 0; var label = values[i]; /*var labelArr = label.split(""); var end = labelArr.length - 1; ... ... labelValue = ( labelArr.slice( startBr+1, endBr ) ).join(""); labelKey = ( labelArr.slice( 0, startBr - 1 ) ).join(""); */ labelValue = label; labelKey = label; namevalues.push( [ labelKey, labelValue ] ); } return namevalues; }
Thanks for publishing your findings. Perhaps you would like to create a pull request at GitHub. @Toniher:
Hello!
I upgrade my wiki to 1.31 version. Upgrade SMW to 3.0 version and PageForms to 4.4.1 version. Semantic Forms Select extension is 3.0.0 version. PHP version 7.2. I have some form with this code
{{{field |AllProtocols40 |input type=SF_Select |function=ask((Category:Some_category1));format~list;sep~,;link~non;headers~hide;limit~500 }}}
Prior to the update field AllProtocols40 worked well. But now, when I switch to the form editing mode, the field is displayed empty, even if before that a value was selected. If I select a value in the field and save it, the value will be saved in the template, but when I switch back to the edit mode, the field is again empty. And if I save the form, then an empty value will fall into the template.
Please help me figure it out.
Someone help me please. It is very important for me. But I don’t have any ideas on what is not working.
If I have the following code for a Semantic Forms Select:
{{{field |ActionItemRequestorIs |input type=SF_Select |query=((Category:User));format~list;sep~,;link~none;headers~hide;limit~500 }}}
How can I set one of the results as a default for a new page created by that form.
In other words, what should I provide in place of "{{mydefaultvalue}}
" in the code below (which does not work):
{{{field |ActionItemRequestorIs |input type=SF_Select |query=((Category:User));format~list;sep~,;link~none;headers~hide;limit~500 |default={{mydefaultvalue}} }}}
For support, please send email to user mail list in SemanticMediawiki. I may not monitor the talk page.
Running:
Mediawiki | 1.30 |
Page Forms | 4.3 (c35e352)12:50, 14 March 2018 |
Semantic Forms Select () | 3.1.0 (59ab714)05:26, 15 May 2018 from Gesinn-it - master |
Was told that the branch at Gesinn-it works [0]
SFS loads but does not work.
Upon debug, I see that I am getting a:
Warning:Invalid argument supplied for foreach() in /opt/htdocs/mediawiki/extensions/SemanticFormsSelect/src/SemanticFormsSelectInput.php on line 172
message on form pages that use |input type=SF_Select|
Until issue 64 is resolved you need to downgrade to Page Forms 4.1
Dear all,
After install we get this issue when loading form with Select : "PHP Fatal error: Class '\\SFS\\SemanticFormsSelect::init' not found in /opt/mediawiki/extensions/PageForms/includes/PF_FormPrinter.php on line 1617"
Install command used : php composer.phar require mediawiki/semantic-forms-select "~2.1"
Config:
MediaWiki: 1.27.3
PHP: 5.6.30 (apache2handler)
SFS_VERSION : 2.1.0-alpha
Same error here : https://sandbox.semantic-mediawiki.org/wiki/Sp%C3%A9cial:AjouterDonn%C3%A9es/DemoAjax1
Any idea ?
Cheers
Stéphane
Sorry, issue already describe here : https://github.com/SemanticMediaWiki/SemanticFormsSelect/issues/64
Hi,
Does anyone know if this problem will be solved soon? Does anyone work on it ?
Cheers
Paul
It would be great if we could use a Cargo query with either 'function' or 'query'. I've tried both options but haven't had any luck so far.
It would be even easier if we could pass @@@@ to a template, which can then contain any kind of query (Cargo, SMW).