Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

new text below the user-defined-function


Go to End


8 Posts   2560 Views

Avatar
helloworld

Community Member, 14 Posts

4 March 2010 at 1:36am

Hi,

if I used the module user-defined-funktion, how can I insert a text below the form?

Thanks

helloworld

Avatar
carlos

Community Member, 42 Posts

4 March 2010 at 9:12am

Hi,

you have two options, in the template or in the Content field in the CMS.

cheers

Avatar
Willr

Forum Moderator, 5523 Posts

4 March 2010 at 9:12am

Did you mean User Defined Forms?

You can user $UserDefinedForm in the content area to state where the form is positioned so then you can add text under that $UserDefinedForm

Avatar
helloworld

Community Member, 14 Posts

4 March 2010 at 9:40am

ohh sorry! sure

*UserDefinedForms*

thanks helloworld

Avatar
helloworld

Community Member, 14 Posts

4 March 2010 at 9:54am

o.k. its possible to make a unique template with

$Content1
$UserDefinedForm
$Content2

or a second template with

$Content1
$UserDefinedForm1
$Content2
$UserDefinedForm2

and a third template... and so on

what I mean is to define a userform and I can include this form with a placeholder in the normal textinput area at content like

[TinyMCE]
----------------------------------
Contact

Please fill out the contact form bla bla

$UserDefinedForm

or call me at 9am to 4pm blablabla
....
-------------------------------------------

thanks

Avatar
helloworld

Community Member, 14 Posts

4 March 2010 at 10:36am

.... I can´t understand the idea to change the Page-Type from Page to UseDefinedForm-Type? For the User or in the Frontend is this Page a "normal Page" with a small Form!

If I combine Text and Form and GMap and FieldListTable and Text and Gallery in one Page - ist this a "TextFormGMapTableTextGallery"-Page-Type with a superspecial unique Template??

hmmmm?? "Wag the Dog"

helloworld

Avatar
Willr

Forum Moderator, 5523 Posts

4 March 2010 at 6:09pm

$UserDefinedForm1
$Content2
$UserDefinedForm2

UserDefinedForms doesn't support having multiple forms on 1 field. If you want content in the middle of a form you could always just make a 'HTMLBlock' field in your form - it accepts no user input on the front end but it was added so you could write a paragraph or 2 in the middle of a form.

Avatar
helloworld

Community Member, 14 Posts

5 March 2010 at 9:51pm

Edited: 05/03/2010 9:52pm

Hi Willr,

o.k. its possible to insert any Textblocks with the UDForm.... I think, this is not enough flexible.

I´m a lot spoiled with Wordpress Modules e.g.
* cforms: http://www.deliciousdays.com/cforms-plugin/ [3 stars]
* Gravity: http://www.gravityforms.com/ [5 stars]

I looked at a other solution like http://doc.silverstripe.org/doku.php?id=recipes:customising-content-in-your-templates

What can I do in function MyUDForm??

function Content() {
return str_replace('$MyUDForm', $this->MyUDForm(), $this->Content);
}

function MyUDForm() {
return ??? $UserDefinedForm ???;
}

Thanks helloworld