## server – Anti-spam question and google recaptcha added for html contact form but still getting spam messages, how to completely stop?

We implemented the below anti-spam question code into our html contact form. Also google recaptcha is active on the form. But still getting spam of dating and automated other spam messages.

Here is the anti-spam question code:

``````<td align=center><font class="err"><TMPL_VAR msg></font><label for="turingtest"> <strong>Anti-Spam Question:</strong> Which is the wrong name of this website?: example, link or example.com? *</label>
<br>
<input type="text" required="required" pattern="( )*(link)( )*" title="Pick the fluffiest animal"/>
<br><input name="send" type="submit" name="btn" value="<TMPL_VAR lang_send_message>"></td>
``````

So this does not work. Maybe some automated spammers are using different techniques. What else we can do?

And how to implement much more powerful anti-spam question and approach into html contact form?

Note: Using a server with CentOS and Apache. Plus perl script and their html pages.

## 8 – Create dynamic text fields on form based on other entities

I’ve created an entity which has fields that users need to fill out. As part of that entity there is a reference field back to a content type ‘food’.

The ‘food’ content type has it’s own entity reference called ‘sections’.

When a user selects a ‘food’, i want to dynamically add each ‘section’ as a title with a textarea box underneath which gets stored against the original entity.

Considered using paragraphs as the ‘sections’ but they need to be reusable on different ‘food’ nodes. Also checked the dynamic fields module but this doesn’t look like it’s well supported.

Fallback approach is going to be to programmatically create a field for each ‘section’ item as they are added, but with this we could end up with hundreds of fields.

Any ideas on how else this can be done programmatically?

## sg.symplectic geometry – What is the significance of a Lagrangian Submanifold and what are the implications of they symplectic form being zero?

I’d like to understand better the relevance of Lagrangian submanifolds in Hamiltonian Mechanics. A Lagrangian Manifold is defined as a submanifold of a symplectic manifold upon which the restriction of a symplectic form $$omega$$ is vanishing. I’d like to understand what this property means and how the flow of a Lagrangian submanifold differs from that of an arbitrary submanifold.

To summarise:

• What does the condition of vanishing symplectic for imply on a Lagrangian Manifold?
• What make Lagrangian submanifold different to other submanifolds in the context of Hamiltonian Mechanics?

## python – sympy in jupyter notebook cannot give answer in latex form

I encountered a problem when using sympy in Jupyter Notebook. Here is the code
(!(enter image description here)(1))(1)

``````import sympy as sp
sp.init_printing()
x,y = sp.symbols('x,y')
expr = x**2 + y**2
expr
``````

Adding sympy.init_printing() will cause cessation of jupyter notebook. How could I solve this problem? Thanks!!
p.s. configuration: win10 + python3 + TexLive
(1): https://i.stack.imgur.com/uZfcD.png

## 8 – How can I change the title for the page containing the node edit form?

#### Stack Exchange Network

Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

## magento2 – Magento 2 how to disable or add form key to adminhtml controller?

How can I add a form key to my controller? it’s redirecting me to dashboard everything it finishes.

this is my code

``````use MagentoBackendAppAction;
use MagentoFrameworkAppRequestInterface;
use TransomPakkeLoggerLogger;
use MagentoSalesApiOrderRepositoryInterface;
use MagentoFrameworkControllerResultFactory;

class Pdf extends Action
{
/**
* @var PageFactory
*/
protected \$request;
protected \$logger;
protected \$orderRepository;
protected \$resultRedirectFactory;
protected \$_redirect;
/**
* @param Context \$context
* @param PageFactory \$resultPageFactory
*/

protected \$_publicActions = ('index');

public function __construct(
RequestInterface \$request,
Logger \$logger,
OrderRepositoryInterface \$orderRepository,
ResultFactory \$resultRedirectFactory,
MagentoFrameworkAppResponseRedirectInterface \$redirect,
MagentoBackendAppActionContext \$context
) {
parent::__construct(\$context);
\$this->request = \$request;
\$this->logger = \$logger;
\$this->orderRepository = \$orderRepository;
\$this->resultRedirectFactory = \$resultRedirectFactory;
\$this->_redirect = \$redirect;
\$this->execute();
}

/**
* Index action
*
* @return MagentoBackendModelViewResultPage
*/
public function execute()
{

\$completeState = MagentoSalesModelOrder::STATE_COMPLETE;
\$order_id = \$this->request->getParam('order_id');

\$order = \$this->orderRepository->get(\$order_id);
\$this->orderRepository->save(\$order);

\$resultRedirect = \$this->resultRedirectFactory->create(MagentoFrameworkControllerResultFactory::TYPE_REDIRECT);
\$resultRedirect->setUrl('sales/order/view/order_id/'.\$order_id.'/');
return \$resultRedirect;

}
}
``````

it should work with this:

``````protected \$_publicActions = ('index');
``````

but it’s not doing anything

## magento2 – Is there a way not to loose input form data on php redirect

I have a webpage with a form when I submit that page I go into a controller…he check the data sent `\$data = \$this->getRequest()->getPostValue();`

And if one of the data isn’t what I am expecting, i’m redirecting on the same url page with an error message.

``````\$this->messageManager->addError(\$errorMessage);
return \$resultRedirect->setUrl(\$this->_redirect->getRefererUrl());
``````

This works fine.

But doing this, i’m loosing all the datas registered previously by the user (cause it’s like if I was opening the url for the first time obviously).

I’m looking for a way to keep that data in the html so may be there is a different kind of redirect possible ?

To resume : Is it possible from php server side to reload a url by keeping the input values.