Menu

Solutions to Problems or Custom Needs in a Website

Many solutions we create for one site can be used and appreciated on other sites also.

Have a look at this list of components and solutions we have developed over time and if you could benefit from any of them you are welcome to them.

Please let us know if you would like to discuss the details or would like some help getting one installed.

How to Click a Button Using Javascript in Action Form

Mark Buelsing 0 0 Article rating: No rating

If the Button ID is FillDirectInput,

Use the following syntax to get the ID and insert into a JQuery click command

$('#'+form.fields.FillDirectInput.id).click();

A way to get the form field values from an action form

${{form.fields.BodyType.value}}

form.fields.CarsName.value
form.fields.cbYear.selected.text

How to refer to another field in JS

Mark Buelsing 0 0 Article rating: No rating
In Javascript, refer to another field like the following example for the field named, 

EndDate

$scope.form.fields.EndDate.value=(in30.getMonth() + 1) + '/' + in30.getDate() + '/' + in30.getFullYear();

Or, to use the ID of another field,

$('#'+form.fields.FillDirectInput.id).click();

Call DNN APIs

Using Action Form

Mark Buelsing 0 0 Article rating: No rating

Hello Mark,
 

You can either use the server request action and simply call the API using that or, depending on your DNNApi version there is a second action called Execute Api Method which skips the HTTP protocol and executes the method directly.

Kind regards,
Cristian P.

Delay Actions

Mark Buelsing 0 2433 Article rating: No rating
Add a ‘Run SQL Query’ action with the following query, which will wait for 5 seconds:

 WAITFOR DELAY '00:00:05';
RSS
1234567
RSS
1234