Extension talk:Page Forms

Sub-Form of Semantic Forms
Hey, dear All

Is there any possible to build a Sub-Form inside Semantic Forms? Or, can we create a Sub-Property which belongs to a Property?

Right now the case is, we want to create a Form, and for Property A, there is no direct content for A, but A has for Sub-Properties, A1,A2,A3 and A4, and we need to input content into A1-A4.

Is there any possible way to do this?Many thanks in advance.


 * I'm not sure I understand your question - but "show on select" might be helpful here. Yaron Koren (talk) 16:50, 5 March 2012 (UTC)


 * Many thanks, as your suggestion, I use the "mutiple template" and it seems to fit with our target, but still we need to talk about it tomorrow.


 * But many thanks anyway, for every help!!

Weirdness using "button" formlink
For some reason when I try to use any formlink with type BUTTON, it doesn't work but instead the popup only loads the main page of the wiki. Weird thing is that I've checked the form action and it is indeed the correct string (even pasted it in to ensure that it would bring me to the right form entry). Just tested this on SF 2.4 (fresh download) and MW 1.17. Thinking back, this actually broke a while back. Maybe I posted here already? Not sure. Weird! It might be conflicts if nobody else is experiencing this. Thorncrag   20:10, 5 March 2012 (UTC)


 * Don't know about the release version. Just tried it on an MW 1.17 with the current dev version of SF and it worked alright. Maybe give it a try. There were several changes in the handling of parser functions. --F.trott (talk) 20:19, 5 March 2012 (UTC)


 * I had the same issue. Then I changed from the default method Mediawiki URLs to more friendly URLs, i.e. example.com/wiki/Page_Name. When I did that, formlinks worked. To do this,

RewriteEngine On RewriteRule ^wiki/(.*)$ /index.php?title=$1 [PT,L,QSA] RewriteRule ^wiki/*$ /index.php [L,QSA] RewriteRule ^/*$ /index.php [L,QSA] --70.91.187.57 18:35, 13 March 2012 (UTC)
 * 1) Add the following line to your LocalSettings.php: $wgArticlePath = "/wiki/$1";
 * 2) Then create a .htaccess file (if not there) in your wiki's root directory, and add:
 * Careful if you already have a .htaccess file. Cavalierly, modifying this file can cause issues with your wiki.

Lingo Extension
Hi. I have started using Semantic Mediawiki 1.7.0.2 wit Semantic Forms 2.3.2

If I have words or phrases in Field names that are on a page called Terminology and used by the Lingo Extension then the extension is interfering with the rendering of the "Edit with Form" page. The inserted Spans are a problem.

I will have to be careful with my terminology!


 * Fixed in the dev version of SF on SVN. --F.trott (talk) 22:57, 5 March 2012 (UTC)

Preloading data into multiple instance template
What preload data into form with multiple instance template? --Pastakhov (talk) 10:24, 6 March 2012 (UTC)


 * If I understand the question correctly - you need to add another index in the query string; see here for one example: http://discoursedb.org/wiki/Special:FormEdit/Item/Some_Item?Opinion[Topic][1]=ABC (sorry, it was too hard to make it a link). Yaron Koren (talk) 01:52, 9 March 2012 (UTC)


 * Rectification: Some_Item?Opinion[index][FieldName]=ABC http://discoursedb.org/wiki/Special:FormEdit/Item/Some_Item?Opinion[1][1]=Topic1&Opinion[1][2]=Position1&Opinion[2][1]=Topic2&Opinion[2][2]=Position2  In form Item Field name not Topic, field name is 1. Thanks for help --Pastakhov (talk) 05:05, 19 March 2012 (UTC)


 * Yes, thanks :-) --Pastakhov (talk) 06:40, 9 March 2012 (UTC)


 * What move data from one multiple instance template to another? Or what get row index in #ask: query? --Pastakhov (talk) 16:24, 13 March 2012 (UTC)


 * I didn't understand the first question, but for the second question, you should store that information using the Semantic Internal Objects extension. Yaron Koren (talk) 17:27, 13 March 2012 (UTC)


 * I have page with multiple instance template. In template i use Semantic Internal Objects. I need button to copy data from this page to new page.

Template:Test
 * tmpl[fld1][ -= need get row index =- ]=
 * tmpl[fld2][ -= need get row index =- ]=

what get row index from #ask: query? mainlabel returns #rowindex. How to get rowindex without # ? Or any ideas, thanks... --Pastakhov (talk) 03:43, 14 March 2012 (UTC)


 * Getting the index is indeed tricky - the NumerAlpha extension might help. Yaron Koren (talk) 12:24, 14 March 2012 (UTC)


 * it needs used additional template, for get one index to several rows. NumerAlpha extension may help, but it looks ugly and difficult to. It would be great to have the column "index number" in #ask:.  many thanks --Pastakhov (talk) 13:13, 14 March 2012 (UTC)


 * I solve similar problems by using Extension:Arrays, and some advanced MediaWiki template programming to handle counting custom formatted SMW data. You can see an example I'm working on here: http://www.coincompendium.com/w/index.php/Sandbox/eBay_sighting_list_test Badon (talk) 21:28, 14 March 2012 (UTC)


 * In sample: {{#vardefineecho: mycounter | {{#expr: {{#var: mycounter }} + 1 }} . Thanks, --Pastakhov (talk) 05:05, 15 March 2012 (UTC)

fancybox not being loaded by form pages
I am having trouble with uploading files in my forms. Fancybox.js does not seem to be loaded with the page. I am running mediawiki 1.18 and SF 2.4.1 at first i thought it was a problem with resource loader but i saw SF is on the list for "Resource loader compatible extensions". If it's not showing up on the page, how do i go about tracking down the problem? Can i manually load it somehow?


 * I have no idea - are you using a skin other than Vector? Or are you using some other extension that might be interfering with the Javascript? And what version of Semantic MediaWiki are you using? Is this a public wiki, by any chance? Yaron Koren (talk) 01:28, 9 March 2012 (UTC)

Mediawiki 1.18 semantic forms 2.4.1, here is an example page, i have enabled editing for anons so you can see what i'm talking about. PlantWiki. I use a custom skin based off Monobook (pretty much only css has been changed). I'm a LAMP developer and don't have much experience tracing javascript so i'm a little lost. Thanks for the help!


 * Ah - the fact that it's a public wiki is extremely helpful. Your problem is a Javascript error, coming from this file. (I've never heard of the "JavaScript" extension before.) And you're using version 1.7.0.2 of Semantic MediaWiki, by the way. Yaron Koren (talk) 11:56, 11 March 2012 (UTC)

Your amazing, thanks for the support! I'm pretty sure your the only dev i have seen with this kind of commitment to helping those using their extension. Much appreciated.


 * Agreed! Badon (talk) 19:47, 13 March 2012 (UTC)

Text box too large
Hello everyone, I'm having trouble enlarging or shrinking a text box (not a textarea) size. I tried using 'size=' parameter but it just remains the same. I have also tried using different browsers but the outcome is still the same. Please help.


 * What's the full tag you have? Yaron Koren (talk) 19:31, 9 March 2012 (UTC)

That would be where hydrogen is the name of the property. Thanks again


 * Try removing the quotes around "1". Yaron Koren (talk) 13:30, 13 March 2012 (UTC)

Oh it works perfectly now! Thanks Yaron!

request: wikieditor textarea size
Since textareas where editor=wikiEditor are contained by the wikiEditor UI and we thus don't appear to have control over the wikiEditor container size, it would seem logical to disable the number of columns and disable setting width to 'auto' when editor=wikiEditor. Thoughts?


 * Nevermind, I found that [[Media:Screenshot 1.png|this]] happens when the textarea is set to autogrow. When autogrow is taken off, the textarea fills the wikiEditor space.

Are you using WikiEditor with forms? I know a lot of people have been asking about this but Yaron has mentioned it's currently not possible.


 * When did I say it wasn't possible? It's been possible since version 2.3. Yaron Koren (talk) 11:56, 11 March 2012 (UTC)

Problems editing a page
I would like that the tab "Edit with form" shows up in every page. So, I created the page "MyWiki:Main" (but changing with my wiki's namespace) with the content Page has default form::form-name.

Am I doing something wrong?

Also, when I'm editing a page, it doesn't show the real source and I really like to edit the source.

For example, the source is: Name: ABC

When I try to edit it shows:


 * For the first question - it should be "Has default form", not "Page has default form". For the 2nd question - that is the real source. Maybe you should read up more about MediaWiki templates. Yaron Koren (talk) 11:57, 11 March 2012 (UTC)

Category select depth
I have the following code in a form:.

However, there seems to be an issue in that I can only select categories up to depth 1. I am able to expand categories to view subcategories of them, but I can't tick the box next to a subcategory, rendering them slightly pointless.

Considering the large number of categories (and especially subcategories) my project has, that is annoying. Is there any way to fix it? Dendodge (talk) 00:49, 12 March 2012 (UTC)

Dynamically extend form
Hi,

I try to do the following: I have a base form/template ("Job") and I want to extend the base form with a specific other template depending on the selection of a "Job type" list box. This already works with:

I have two  section in my form (with id "jobtype_website" and "jobtype_application"). These two DIVs contain a complete form specification.

Now, when I save the form, both template definitions are included into the final page, even the one that was not visible in the form. Is it possible to create a template definition only when the DIV containing the form is visible? Or when a specific field inside the extended form is filled?

Or, as an alternative solution: Is there a possibility to limit the "multiple" form to allow only 0 or 1 forms?

Thanks. Jens--157.161.162.66 15:10, 12 March 2012 (UTC)


 * Hi - being able to limit the number of instances of a multiple-instance template might have been a reasonable solution here, but unfortunately it can't be done. What's so bad about having the extra, unused template in the page, though? If the issue is that it's displaying some header that you don't want it to, you can get around that by using #if to only show the header when necessary. Conversely, you don't need even need three templates - you can have everything in one big template, again using #if to only show the relevant parts each time. Yaron Koren (talk) 17:02, 12 March 2012 (UTC)

Dynamically show listbox entries depending on selected value of other listbox
Hi,

as described in the title, I have to listboxes. The first one shows the main category. Now depending on the selected values (one or more are possible), I want to show different values in the second listbox. I tried the "values dependent on" parameter but it didn't work out and I couldn't find a description in which way it should be implemented.

Or can it be easier to realize with an ask query?

Hope someone can help. Thanks, Chris


 * Unfortunately, this can't really be done. As noted in the documentation, "values dependent on" only works with the input types 'combobox', 'text with autocomplete' and 'textarea with autocomplete'. You might be able to do mimic this using "show on select", but note that each "shown" field would have to have a different name. Yaron Koren (talk) 13:43, 13 March 2012 (UTC)

Issue with Edit with Form
I have put 2.4.1 on my IIS 7.5 wiki and I get the following error:

"PHP Fatal error: Class '<' not found in D:\www\IIS7\http-root\ict-test-wiki\extensions\SemanticForms\includes\forminputs\SF_FormInput.php on line 308"

Product Version MediaWiki 1.18.1 PHP 5.2.17 (cgi-fcgi) MySQL 5.5.11

Semantic extensions Semantic Bundle (Version 20120124) Semantic Forms (Version 2.4.1) Semantic Forms Inputs (Version 0.5) Semantic MediaWiki (Version 1.7.0.2) Semantic Result Formats (Version 1.7)

Can someone help and suggest where I might be able to fix things?

Thank


 * Hi - this looks like a bug in SF that's appearing due to your PHP version, and possibly due to IIS as well. If possible, to help us in fixing it, could you add the following line between lines 304 and 305 of that file (\includes\forminputs\SF_FormInput.php);

print_r( $bt[1]['args'] );
 * ...and print out here what gets displayed? Yaron Koren (talk) 13:31, 14 March 2012 (UTC)

I'm getting the exact same error on a linux server. MediaWiki 1.18.1, PHP 5.2.17 (cgi-fcgi), MySQL 5.1.56, Semantic MediaWiki 1.7.1, Semantic Forms 2.4.1 Output after adding 'print_r( $bt[1]['args'] );' Array ( [0] => Array ( [0] => SFTextAreaInput [1] => getHTML ) [1] => Array ( [0] => [1] => Test Template[Name] [2] => [3] => [4] => Array ( [possible_values] => Array [value_labels] => [is_list] => [semantic_property] => Name [property_type] => _txt ) ) ) Array ( [0] => Array ( [0] => SFTextAreaInput [1] => getHTML ) [1] => Array ( [0] => [1] => Test Template[Address] [2] => [3] => [4] => Array ( [possible_values] => Array [value_labels] => [is_list] => [semantic_property] => Address [property_type] => _txt ) ) ) Array ( [0] =>  {| class="formtable" ! Name: |  |- ! Address: |  |}  Free text:   [1] => [2] => [3] => 229 [4] => [5] => Radge [6] => ) Fatal error: Class '<' not found in /home/rellard/public_html/www.ecig-boxmods.com/extensions/SemanticForms/includes/forminputs/SF_FormInput.php on line 309


 * Okay - it must just be PHP 5.2, then. This is clearly a pretty major bug. Yaron Koren (talk) 17:01, 16 March 2012 (UTC)

If it's any help I can probably upgrade my hosting to PHP 5.3 to see or would that cause more problems? Done, It's fine now with PHP 5.3 Thanks a lot :)


 * Hi - this was just fixed in SVN by Stephan Gambke; if anyone has this problem and has SVN, just update the code. If you don't have SVN, you can make the change manually - see here. There will hopefully be a new version of SF with this fix, soon. Yaron Koren (talk) 19:59, 16 March 2012 (UTC)

Multiple values for a template
Hi all,

Relative at this example

Give a type:

I don't know if it's a bug but when I was using Semantic Forms 2.4-alpha it worked well. But when I upgraded the new version Semantic Forms 2.4.1 I can't edit a page using this Form

best regards, Fary


 * What do you mean - why can't you edit the page? Yaron Koren (talk) 15:12, 14 March 2012 (UTC)

If I edit a page I have a blank page.


 * Ah - please see here. Yaron Koren (talk) 16:35, 14 March 2012 (UTC)

I increase my memory at 128M and if I put in my LocalSettings error_reporting( E_ALL ); ini_set( 'display_errors', 1 ); It shows Fatal error: Call to a member function getOutput on a non-object in ..../extensions/SemanticForms/includes/SF_FormEditAction.php on line 179 instead of the edit page


 * Cool, thanks. You've found a bug - thankfully, it seems that it only appears when there's more than one form defined for a page. Also, I'm guessing that you're using MediaWiki 1.17. Anyway, I just checked in what I think is a fix - if you have SVN, please update, and let me know if that fixed the problem. Yaron Koren (talk) 13:41, 15 March 2012 (UTC)

I'm using MediaWiki 1.17.0 but the problem is the same


 * You updated Semantic Forms? What's the error message you're getting now? Yaron Koren (talk) 17:42, 15 March 2012 (UTC)

Error message is the same: Fatal error: Call to a member function getOutput on a non-object in ..../extensions/SemanticForms/includes/SF_FormEditAction.php on line 179 when I use Semantic Forms 2.4.1 with MediaWiki 1.17.0 but if I use Semantic Forms 2.4-alpha there's not problem


 * You must have somehow not updated SF fully - at the very least, you should have gotten a different line number. Yaron Koren (talk) 11:58, 16 March 2012 (UTC)

Yeah! it's working now. May be my update wasn't complete. Thanks Yaron


 * It's great to hear that the fix worked. Yaron Koren (talk) 16:04, 16 March 2012 (UTC)

Forms fail after updating to latest Semantic Bundle
I just updated to the latest Semantic Bundle and get the following when I try to Edit with form:

Fatal error: Class '<' not found in /home/content/65/6092565/html/scientolipedia/extensions/SemanticForms/includes/forminputs/SF_FormInput.php on line 308

The line 308 is:

$input = new $calledClass ( $sfgFieldNum, $cur_value, $input_name, $is_disabled, $other_args );

Thanks in advance for any help. DaveL (talk) 14:41, 16 March 2012 (UTC) MediaWiki 1.18.0,PHP 5.2.17 (cgi-fcgi),MySQL 5.0.92-log, Semantic Bundle (Version 20120308)


 * This bug was already reported, above (I assume it's due to the use of PHP 5.2). IIf possible, could you try the debugging call, as I suggested above? Yaron Koren (talk) 15:15, 16 March 2012 (UTC)


 * The printout is here DaveL (talk) 16:07, 16 March 2012 (UTC)


 * Thanks for the printout; that was helpful. This problem has been fixed in SVN; see above. Yaron Koren (talk) 20:00, 16 March 2012 (UTC)


 * Thanks Yaron, that fixed it. DaveL (talk) 21:01, 16 March 2012 (UTC)

Sizing Image For Display On Form
SF 2.3.2/MW 1.18:  I am wanting to have the form display a given size for the image that I upload (e.g.; 200x200). Is this possible and if so how would I do it? Thanx! --Coffeehound (talk) 21:36, 18 March 2012 (UTC)