Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Where to appoint, what a button should do?
Hey
I'm actually developping an own extension, which appears in a seperate tab.
I've create a few of textfields an a Button, but how can I make clear, whta should be done, if the user clicks the button?
--Richard
I'm actually developping an own extension, which appears in a seperate tab.
I've create a few of textfields an a Button, but how can I make clear, whta should be done, if the user clicks the button?
--Richard
0
This discussion has been closed.
Comments
$variable = GetIncomingString('FormFieldName', 'Default value to use if nothing was passed from the form');
If you want to do something in the user's browser, that would be something like this:
<input type="button" onclick="alert('Boo!');return false">Click me!
I want to pass them back...
so I need ForceIncommingString?
My Render-functions look like that:
echo "<input type='text' name='Name' value='' class='SmallInput' /><br />"; echo "<input type='submit' name='btnSave' value='Speichern' class='Button SubmitButton' />"; $var= ForceIncomingString('Name', 'baaaaad'); echo $var;
but I get always the "baaaaad" string aus output... even if I click the button... whats going on, if I click it?
Will the page be reloaded?
Where I have to catch the "IncommingString"?
Keep in mind when you are learning about PHP that Vanilla's framework tries to make the work easier for you in some places, so instead of having to worry about $_GET['name'] or $_POST['name'], which can return escaped or unescaped data depending on your security settings, you have ForceIncomingString('name', ''). You can learn a bit more how it works by looking at library/framework/Functions.php, where it is defined, around line 340.
Probably the best way to learn would be to find an extension that does something similar--off the top of my head, extensions that I know use forms and save data are Announcement, ToDo list, Signatures, Extended Application Form, Add Comments, and Nuggets (these last two might be a bit hard to understand at first...)
Good luck!