Skip to main content
added 33 characters in body
Source Link
Caleb
  • 71.9k
  • 19
  • 203
  • 232

Drupal forms are often two-step affairs requiring a preview/approval stage. The form you are seeing is identical and pre-filled out with the values you submitted from the first one, but there will also be a preview of the action on the page and a hidden form field that indicates that the next form submission is being submitted from the preview so the data should actually be saved.

The difference is typically the name of the submit button. On forms that require preview, the submit button will pass the operation as op=Preview and from the form on the preview page it will send op=Save.

  The good news is that it doesn't actually track this preview stage server-side, it just uses clues from the form to know what step you are at. When submitting with an automated fashion like you are trying to do from like curl, you can skip straight to the real save by including sending op=Save instead of using the value from the initial form.

Additionally, someDrupal forms are usually tracked using a unique identifier or token. In order to submit these forms automatically, you will need to download the page with curlcurl, parse it for the form this form field that contains the unique token (called form_token in DP7), then make sure and include the valuethat key/value pair in your postPOST.

At least in Drupal 7 you should have no problem combining these techniques. The form token does not change from the preview to the final, so once you fetch the token you can skip straight to the final save POST.

Drupal forms are often two-step affairs requiring a preview/approval stage. The form you are seeing is identical and pre-filled out with the values you submitted from the first one, but there will also be a preview of the action on the page and a hidden form field that indicates that the next form submission is being submitted from the preview so the data should actually be saved.

The difference is typically the name of the submit button. On forms that require preview, the submit button will pass the operation as op=Preview and from the form on the preview page it will send op=Save.

  The good news is that it doesn't actually track this preview stage server-side, it just uses clues from the form to know what step you are at. When submitting with an automated fashion like you are trying to do from like curl, you can skip straight to the real save by including sending op=Save instead of using the value from the initial form.

Additionally, some forms are tracked using a unique identifier or token. In order to submit these forms automatically you need to download the page with curl, parse it for the form this form field (called form_token in DP7), then make sure and include the value in your post.

At least in Drupal 7 you should have no problem combining these techniques. The form token does not change from the preview to the final, so once you fetch the token you can skip straight to the final save POST.

Drupal forms are often two-step affairs requiring a preview/approval stage. The form you are seeing is identical and pre-filled out with the values you submitted from the first one, but there will also be a preview of the action on the page and a hidden form field that indicates that the next form submission is being submitted from the preview so the data should actually be saved.

The difference is typically the name of the submit button. On forms that require preview, the submit button will pass the operation as op=Preview and from the form on the preview page it will send op=Save. The good news is that it doesn't actually track this preview stage server-side, it just uses clues from the form to know what step you are at. When submitting with an automated fashion like you are trying to do from like curl, you can skip straight to the real save by including sending op=Save instead of using the value from the initial form.

Additionally, Drupal forms are usually tracked using a unique identifier or token. In order to submit these forms automatically, you will need to download the page with curl, parse it for the form field that contains the unique token (called form_token in DP7), then include that key/value pair in your POST.

At least in Drupal 7 you should have no problem combining these techniques. The form token does not change from the preview to the final, so once you fetch the token you can skip straight to the final save POST.

added 502 characters in body
Source Link
Caleb
  • 71.9k
  • 19
  • 203
  • 232

DrupalDrupal forms are often two-step affairs requiring a preview/approval stage. The form you are seeing is identical and pre-filled out with the values you submitted from the first one, but there will also be a preview of the action on the page and a hidden form field that indicates that the next form submission is being submitted from the preview so the data should actually be saved.

The difference is typically the name of the submit button. On forms that require preview, the submit button will pass the operation as op=Preview and from the form on the preview page it will send op=Save.

The good news is that it doesn't actually track this preview stage server-side, it just uses clues from the form to know what step you are at. When submitting with an automated fashion like you are trying to do from like curl, you can skip straight to the real save by including sending op=Save instead of using the value from the initial form.

Additionally, some forms are tracked using a unique identifier or token. In order to submit these forms automatically you need to download the page with curl, parse it for the form this form field (called form_token in DP7), then make sure and include the value in your post.

At least in Drupal 7 you should have no problem combining these techniques. The form token does not change from the preview to the final, so once you fetch the token you can skip straight to the final save POST.

Drupal forms are often two-step affairs requiring a preview/approval stage. The form you are seeing is identical and pre-filled out with the values you submitted from the first one, but there will also be a preview of the action on the page and a hidden form field that indicates that the next form submission is being submitted from the preview so the data should actually be saved.

The difference is typically the name of the submit button. On forms that require preview, the submit button will pass the operation as op=Preview and from the form on the preview page it will send op=Save.

The good news is that it doesn't actually track this preview stage server-side, it just uses clues from the form to know what step you are at. When submitting with an automated fashion like you are trying to do from like curl, you can skip straight to the real save by including sending op=Save instead of using the value from the initial form.

Drupal forms are often two-step affairs requiring a preview/approval stage. The form you are seeing is identical and pre-filled out with the values you submitted from the first one, but there will also be a preview of the action on the page and a hidden form field that indicates that the next form submission is being submitted from the preview so the data should actually be saved.

The difference is typically the name of the submit button. On forms that require preview, the submit button will pass the operation as op=Preview and from the form on the preview page it will send op=Save.

The good news is that it doesn't actually track this preview stage server-side, it just uses clues from the form to know what step you are at. When submitting with an automated fashion like you are trying to do from like curl, you can skip straight to the real save by including sending op=Save instead of using the value from the initial form.

Additionally, some forms are tracked using a unique identifier or token. In order to submit these forms automatically you need to download the page with curl, parse it for the form this form field (called form_token in DP7), then make sure and include the value in your post.

At least in Drupal 7 you should have no problem combining these techniques. The form token does not change from the preview to the final, so once you fetch the token you can skip straight to the final save POST.

Source Link
Caleb
  • 71.9k
  • 19
  • 203
  • 232

Drupal forms are often two-step affairs requiring a preview/approval stage. The form you are seeing is identical and pre-filled out with the values you submitted from the first one, but there will also be a preview of the action on the page and a hidden form field that indicates that the next form submission is being submitted from the preview so the data should actually be saved.

The difference is typically the name of the submit button. On forms that require preview, the submit button will pass the operation as op=Preview and from the form on the preview page it will send op=Save.

The good news is that it doesn't actually track this preview stage server-side, it just uses clues from the form to know what step you are at. When submitting with an automated fashion like you are trying to do from like curl, you can skip straight to the real save by including sending op=Save instead of using the value from the initial form.