Semantic Mediawiki forms - mediawiki

I am using Semantic Mediawiki Form. I want to change the URL and I'd like to structure the URL so that it contains some fields. E.g.: {country}/{state}/{city}.
I want to add these three details to the URL. How do I add that?

I am not sure I understand your question correctly, but do you want to preload your form with some data from the url? In that case it depends on what forms you are talking about. SF comes with forms for editing and forms for making queries.
*Query forms can be preloaded with data from the url (though the recommended way is through a special parser function), see http://www.mediawiki.org/wiki/Extension:Semantic_Forms/Linking_to_forms
*In editing forms you can only use predefined templates, like this: {{#forminput:form=MyForm|query string=preload=Template:MyPreloadTemplate}}

Related

Netsuite custom html case form - where does it go?

I have several forms on my website, and currently working on replacing these forms with Netsuite's forms.
To do so I create an html template for each form, using Netsuite's nl tags.
The requirement is to save the submissions of each form separately, but I don't know how to make it appear under a certain list, everything goes under 'leads'.
I may be missing something since I'm not entirely familiar with Netsuite's terminology regarding lists,cases, etc.
NetSuite already has Case, Customer and Email forms and if you have separate list then you can create Custom record and use online form under that record and public that form so it will be stored separately on your custom record.
Hope this help.
Regards,
Mayur

HTML Form: Can submitted GET/POST parameters be suppressed using only HTML or CSS?

I am volunteering on a website-based project that is trying to make all pages fully operable JavaScript free before adding any JavaScript for enhancements, and I was asked to investigate whether or not a particular scenario could be handled purely through HTML/CSS.
What we have is a form that is populated to help us filter a list of tickets that are displayed on the screen after a page update through a GET action, which itself works fine, but the concern with the current implementation is that the URL cannot be made into a permanent link. The request, however, to keep the permanent link as minimal as possible, is to only send GET parameters for fields that are populated with something (so, suppressing GET parameters for fields that are blank) instead of having a different GET parameter for each form field on the page.
I have thought of several ways that could be done, most including JavaScript (example: create fields with ids but no names and a hidden field w/ name that uses JS to grab the data from the fields), but also one that would be a POST action with a redirect back to the GET with a human readable string that could be permanently used. The lead dev, however would prefer not to go through the POST/redirect method if at all possible.
That being said, I'm trying to make sure I cover all my bases and ask experts their thoughts on this before I strongly push for the POST/redirect solution: Is there a way using only HTML & CSS to directly suppress GET parameters of a form for fields that are blank without using a POST/redirect?
No, suppressing fields from being submitted in an HTML form with method of "GET" is not possible without using JavaScript, or instead submitting the form with a POST method and using a server side function to minimize the form.
What fields are submitted are defined by the HTML specification and HTML and CSS alone cannot modify this behavior and still have the browser be compliant with the standards.
No, you cannot programmatically suppress any default browser behavior without using some kind of client scripting language, like JavaScript.
As a side note, you say "JavaScript for enhancements", but JavaScript is not used for enhancements these days. And no one in the real world would except a decent front-end without the use of JavaScript. I would suggest you simply use JavaScript.
I do not think you can avoid Javascript here to pre process before submission to eliminate unchanged /empty form fields.

Localizing a Google Chrome Web App

I'm trying to add localization support to a Google Chrome Web App and, while it is easy to define strings for manifest and CSS files, it is somewhat more difficult for HTML pages.
In the manifest and in CSS files I can simply define localization strings like so:
__MSG_name__
but this doesn't work with HTML pages.
I can make a JavaScript function to fire onload that does the job like so:
document.title = chrome.i18n.getMessage("name");
document.querySelector("span.name").innerHTML = chrome.i18n.getMessage("name");
but this seems awfully ineffecient. Furthermore, I would like to be able to specify the page metadata; application-name and description, pulling the values from the localization files. What would be the best way of doing all this?
Thanks for your help.
Please refer to this documentation:
http://code.google.com/chrome/extensions/i18n.html
If you want to add localized content within HTML, you would need to do it via JavaScript as you mentioned before. That is the only way you can do it.
chrome.i18n.getMessage("name")
It isn't inefficient to do that, you can place your JavaScript at the end of the document (right before the end body tag) and it will fill up the text with respect to the locale.
Dunno if i understand exactly what you are trying to do but you could dynamically retrieve the LANG attribute (using .getAttribute("lang") or .lang) of the targeted tag and serve accordingly the proper values.

Methods to copy form values from one form to another?

I need to copy values from a form displayed in one HTML page (incoming.html) to another HTML page (outgoing.html) in a browser. What will be the best approach to this, I have tried using imacros but have not been able to figure it out. I believe there can be a javascript solution to the above. What can be the best approach, I need the feature in a prototype and hence efficiency does not matter.
The best option would be to use a server scripting language. You can pass values between two HTML pages in 2 ways.
First, storing them in cookies using Javascript. If cookies are not enabled, then it would be a problem.
Second, Passing Values through the URL like PHP, but this method is not very secure if your using information that you do not want the user to view.
For eg:
a href='something.htm?Something=Passing some variables'
You can fetch them in the next page using Javascript and display them.

How can I send information from one html page to another?

I want to create an html page which contains a text box. When I am given input and the Enter key is pressed, I want it to go to another html page and display the typed keyword.
How can I do this?
I think you need to use a server-side scripting language to facilitate the manipulation of the inputted data on the form, so that it gets "saved" and displayed in the other html page. I suggest you try reading about PHP, and then turn to handling information in Web Forms...just a thought!
You can use Javascript for that. Check this Tutorial : How do I pass variables between two pages? (GET method)