Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
By marcosfpa
#813692
I have a restricted area on my internal intranet and put a link to call a ProcessMaker WEB ENTRY. Is it possible by calling the web entry already fill in some field of it automatically by sending in the URL parameters? I do not know, maybe if I edited the web entry code and made a GET?
User avatar
By amosbatto
#813705
You could add PHP code that sets case variables that are associated with fields in the Web Entry. Here is an example:
viewtopic.php?f=41&t=730262&p=813417&hi ... ry#p813417

The other option is to add GET variables to the URL of your web entry and then use JavaScript that pulls those variables from the window.location.href and uses them to set the value of fields in the dynaform.

For example, if you have this URL:
http://localhost:321/sysworkflow/en/neo ... ry&new=yes

And you have this JavaScript code in the form:
Code: Select all
$aMatch = location.search.match(/service=([a-z]+)/);
if ($aMatch != null && $aMatch.length >= 2) {
  $("#medicalService").setValue($aMatch[1]);
}

$aMatch2 = location.search.match(/new=([a-z]+)/);
if ($aMatch2 != null && $aMatch2.length >= 2){
  if ($aMatch2[1] == "yes") {
    $("#newPatient").setValue("1");
  }
}
 
Then, the values will automatically be inserted in the fields:
webEntryWithGETVars.png
webEntryWithGETVars.png (35.41 KiB) Viewed 2152 times
Here is an example process:
(33.32 KiB) Downloaded 236 times

Try the CloudMigration PST Converter to convert […]

In the rapidly evolving world of online sports be[…]

STEPN integrates social networking and games that […]

Cenforce 150 is a medication used to cope with a c[…]